diff options
author | B. Stack <bgstack15@gmail.com> | 2021-07-15 09:50:54 -0400 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2021-07-15 09:50:54 -0400 |
commit | fccb76c1f19a08ee0f0db6014cd217a64ba3502f (patch) | |
tree | 774b9ac395e65f9346210dcf804aa58f1b3975d1 /zen/format_unit.cpp | |
parent | Merge branch '11.11' into 'master' (diff) | |
download | FreeFileSync-fccb76c1f19a08ee0f0db6014cd217a64ba3502f.tar.gz FreeFileSync-fccb76c1f19a08ee0f0db6014cd217a64ba3502f.tar.bz2 FreeFileSync-fccb76c1f19a08ee0f0db6014cd217a64ba3502f.zip |
add upstream 11.12
Diffstat (limited to 'zen/format_unit.cpp')
-rw-r--r-- | zen/format_unit.cpp | 10 |
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")); } |