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

@ -425,10 +425,10 @@ static inline region_t win_get_bounding_shape_global_by_val(win *w) {
*/
static inline margin_t attr_pure win_calc_frame_extents(const win *w) {
margin_t result = w->frame_extents;
result.top = max_i(result.top, w->g.border_width);
result.left = max_i(result.left, w->g.border_width);
result.bottom = max_i(result.bottom, w->g.border_width);
result.right = max_i(result.right, w->g.border_width);
result.top = max2(result.top, w->g.border_width);
result.left = max2(result.left, w->g.border_width);
result.bottom = max2(result.bottom, w->g.border_width);
result.right = max2(result.right, w->g.border_width);
return result;
}