From 5d67bbde861b0fa47d231ee1f0741317c4de5519 Mon Sep 17 00:00:00 2001 From: Kirill Primak Date: Tue, 23 May 2023 21:02:18 +0300 Subject: [PATCH] util/box: simplify empty box case in wlr_box_intersection() --- util/box.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/util/box.c b/util/box.c index 2ff22686..20107281 100644 --- a/util/box.c +++ b/util/box.c @@ -43,10 +43,7 @@ bool wlr_box_intersection(struct wlr_box *dest, const struct wlr_box *box_a, bool b_empty = wlr_box_empty(box_b); if (a_empty || b_empty) { - dest->x = 0; - dest->y = 0; - dest->width = -100; - dest->height = -100; + *dest = (struct wlr_box){0}; return false; }