mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Common/MathUtil: Move IntLog2 into MathUtil namespace
Gets this out of the global namespace.
This commit is contained in:
@ -547,7 +547,7 @@ std::string FormatSize(u64 bytes, int decimals)
|
||||
// div 10 to get largest named unit less than size
|
||||
// 10 == log2(1024) (number of B in a KiB, KiB in a MiB, etc)
|
||||
// Max value is 63 / 10 = 6
|
||||
const int unit = IntLog2(std::max<u64>(bytes, 1)) / 10;
|
||||
const int unit = MathUtil::IntLog2(std::max<u64>(bytes, 1)) / 10;
|
||||
|
||||
// Don't need exact values, only 5 most significant digits
|
||||
const double unit_size = std::pow(2, unit * 10);
|
||||
|
Reference in New Issue
Block a user