fix(string_util): Use binary base for file sizes

This commit is contained in:
Michael Carlberg 2016-11-13 08:15:20 +01:00
parent d2a6773c26
commit 910baaecb2

View File

@ -178,7 +178,7 @@ namespace string_util {
vector<string> suffixes{"TB", "GB", "MB"}; vector<string> suffixes{"TB", "GB", "MB"};
string suffix{"KB"}; string suffix{"KB"};
while ((bytes /= 1000) > 999) { while ((bytes /= 1024) >= 1024) {
suffix = suffixes.back(); suffix = suffixes.back();
suffixes.pop_back(); suffixes.pop_back();
} }