mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
CommonFuncs: Convert ROUND_UP_POW2 macro to a function
Also move it to MathUtils where it belongs with the rest of the power-of-two functions. This gets rid of pollution of the current scope of any translation unit with b<value> macros that aren't intended to be used directly.
This commit is contained in:
@ -15,13 +15,6 @@ constexpr size_t ArraySize(T (&arr)[N])
|
||||
return N;
|
||||
}
|
||||
|
||||
#define b2(x) ((x) | ((x) >> 1))
|
||||
#define b4(x) (b2(x) | (b2(x) >> 2))
|
||||
#define b8(x) (b4(x) | (b4(x) >> 4))
|
||||
#define b16(x) (b8(x) | (b8(x) >> 8))
|
||||
#define b32(x) (b16(x) | (b16(x) >> 16))
|
||||
#define ROUND_UP_POW2(x) (b32(x - 1) + 1)
|
||||
|
||||
#ifndef _WIN32
|
||||
|
||||
// go to debugger mode
|
||||
|
Reference in New Issue
Block a user