From fccb76c1f19a08ee0f0db6014cd217a64ba3502f Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Thu, 15 Jul 2021 09:50:54 -0400 Subject: add upstream 11.12 --- zen/format_unit.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'zen/format_unit.cpp') 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")); } -- cgit