diff options
author | B. Stack <bgstack15@gmail.com> | 2021-07-15 15:01:41 +0000 |
---|---|---|
committer | B. Stack <bgstack15@gmail.com> | 2021-07-15 15:01:41 +0000 |
commit | bc6f56c106b894409640a7730838bd52ec0c8044 (patch) | |
tree | 774b9ac395e65f9346210dcf804aa58f1b3975d1 /zen/format_unit.cpp | |
parent | Merge branch '11.11' into 'master' (diff) | |
parent | add upstream 11.12 (diff) | |
download | FreeFileSync-bc6f56c106b894409640a7730838bd52ec0c8044.tar.gz FreeFileSync-bc6f56c106b894409640a7730838bd52ec0c8044.tar.bz2 FreeFileSync-bc6f56c106b894409640a7730838bd52ec0c8044.zip |
Merge branch '11.12' into 'master'
add upstream 11.12
See merge request opensource-tracking/FreeFileSync!35
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")); } |