From 7803022d331c87a4d0ec827af3735c0f8b206676 Mon Sep 17 00:00:00 2001 From: "Devin J. Pohly" Date: Thu, 24 Dec 2020 21:37:21 -0500 Subject: simplify ROUND macro --- dwl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dwl.c b/dwl.c index ed4325d..8a03247 100644 --- a/dwl.c +++ b/dwl.c @@ -53,7 +53,7 @@ #define LENGTH(X) (sizeof X / sizeof X[0]) #define END(A) ((A) + LENGTH(A)) #define TAGMASK ((1 << LENGTH(tags)) - 1) -#define ROUND(X) ((X)>=0?(long)((X)+0.5):(long)((X)-0.5)) +#define ROUND(X) ((int)((X)+0.5)) #ifdef XWAYLAND #define WLR_SURFACE(C) ((C)->type != XDGShell ? (C)->surface.xwayland->surface : (C)->surface.xdg->surface) #else -- cgit v1.2.3