1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 03:23:15 +01:00

Removed parentheses for improved readability

This commit is contained in:
Tulio Leao
2019-12-01 22:45:16 -03:00
parent 1e67c3bff8
commit c4089acd63

View File

@@ -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