mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
MathUtil: Mark IntLog2 as constexpr
Mostly everything else was already marked as constexpr, and the only function IntLog2 calls (CountLeadingZeros) is already constexpr.
This commit is contained in:
@ -191,7 +191,7 @@ private:
|
|||||||
float MathFloatVectorSum(const std::vector<float>&);
|
float MathFloatVectorSum(const std::vector<float>&);
|
||||||
|
|
||||||
// Rounds down. 0 -> undefined
|
// Rounds down. 0 -> undefined
|
||||||
inline int IntLog2(u64 val)
|
constexpr int IntLog2(u64 val)
|
||||||
{
|
{
|
||||||
return 63 - Common::CountLeadingZeros(val);
|
return 63 - Common::CountLeadingZeros(val);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user