mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-27 14:58:32 +00: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:
parent
3cca051850
commit
ba01f6dba3
7 changed files with 29 additions and 23 deletions
|
@ -18,14 +18,6 @@ TEST(CommonFuncs, ArraySizeFunction)
|
|||
(void)test2;
|
||||
}
|
||||
|
||||
TEST(CommonFuncs, RoundUpPow2Macro)
|
||||
{
|
||||
EXPECT_EQ(4, ROUND_UP_POW2(3));
|
||||
EXPECT_EQ(4, ROUND_UP_POW2(4));
|
||||
EXPECT_EQ(8, ROUND_UP_POW2(6));
|
||||
EXPECT_EQ(0x40000000, ROUND_UP_POW2(0x23456789));
|
||||
}
|
||||
|
||||
TEST(CommonFuncs, CrashMacro)
|
||||
{
|
||||
EXPECT_DEATH({ Crash(); }, "");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue