Eliminate implicit conversions

Use explicit conversions everywhere. Adding bounds check assertions when
necessary.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-03-30 09:07:21 +00:00
parent 532a90d573
commit 0037b7e5fb
35 changed files with 786 additions and 671 deletions

View File

@@ -42,7 +42,8 @@ static inline rect_t from_x_rect(const xcb_rectangle_t *rect) {
/// Returning an array that needs to be freed
static inline rect_t *from_x_rects(int nrects, const xcb_rectangle_t *rects) {
rect_t *ret = ccalloc(nrects, rect_t);
for (int i = 0; i < nrects; i++)
for (int i = 0; i < nrects; i++) {
ret[i] = from_x_rect(rects + i);
}
return ret;
}