From 18201dfbc329c09d1bed9a296422f3448b82bbde Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Tue, 30 Aug 2022 08:57:19 +0100 Subject: [PATCH] Cleanup: Simplify CenterBounds() --- src/gfx_func.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gfx_func.h b/src/gfx_func.h index 4ebb85aed2..c5bf12914b 100644 --- a/src/gfx_func.h +++ b/src/gfx_func.h @@ -139,7 +139,7 @@ bool FillDrawPixelInfo(DrawPixelInfo *n, int left, int top, int width, int heigh */ static inline int CenterBounds(int min, int max, int size) { - return min + (max - min - size + 1) / 2; + return (min + max - size + 1) / 2; } /* window.cpp */