From c4089acd63532daffe41e89c08fabb9af1d3df7e Mon Sep 17 00:00:00 2001 From: Tulio Leao Date: Sun, 1 Dec 2019 22:45:16 -0300 Subject: [PATCH] Removed parentheses for improved readability --- src/openrct2/common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openrct2/common.h b/src/openrct2/common.h index 05a112f365..8ad6ac6a0d 100644 --- a/src/openrct2/common.h +++ b/src/openrct2/common.h @@ -59,14 +59,14 @@ constexpr bool is_power_of_2(int v) constexpr int floor2(const int x, const int y) { assert(is_power_of_2(y)); - return ((x) & (~((y)-1))); + return x & ~(y - 1); } // Rounds an integer up to the given power of 2. y must be a power of 2. constexpr int ceil2(const int x, const int y) { assert(is_power_of_2(y)); - return (((x) + (y)-1) & (~((y)-1))); + return (x + y - 1) & ~(y - 1); } // Gets the name of a symbol as a C string