summaryrefslogtreecommitdiff
path: root/zen/format_unit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zen/format_unit.cpp')
-rw-r--r--zen/format_unit.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/zen/format_unit.cpp b/zen/format_unit.cpp
index b2d1b59a..d546124f 100644
--- a/zen/format_unit.cpp
+++ b/zen/format_unit.cpp
@@ -54,23 +54,23 @@ std::wstring zen::formatFilesizeShort(int64_t size)
auto formatUnit = [&](const std::wstring& unitTxt) { return replaceCpy(unitTxt, L"%x", formatThreeDigitPrecision(sizeInUnit)); };
- sizeInUnit /= 1024;
+ sizeInUnit /= bytesPerKilo;
if (std::abs(sizeInUnit) < 999.5)
return formatUnit(_("%x KB"));
- sizeInUnit /= 1024;
+ sizeInUnit /= bytesPerKilo;
if (std::abs(sizeInUnit) < 999.5)
return formatUnit(_("%x MB"));
- sizeInUnit /= 1024;
+ sizeInUnit /= bytesPerKilo;
if (std::abs(sizeInUnit) < 999.5)
return formatUnit(_("%x GB"));
- sizeInUnit /= 1024;
+ sizeInUnit /= bytesPerKilo;
if (std::abs(sizeInUnit) < 999.5)
return formatUnit(_("%x TB"));
- sizeInUnit /= 1024;
+ sizeInUnit /= bytesPerKilo;
return formatUnit(_("%x PB"));
}
bgstack15