Merge pull request #9868 from leoetlino/constexpr-intlog2
MathUtil: Mark IntLog2 as constexpr
This commit is contained in:
commit
02309bd0ac
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue