From 840e906a4ddbbb32b8a5989e8a0ce10c8c374819 Mon Sep 17 00:00:00 2001 From: B Stack Date: Tue, 2 Mar 2021 17:23:41 -0500 Subject: add upstream 11.7 --- zen/format_unit.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'zen/format_unit.cpp') diff --git a/zen/format_unit.cpp b/zen/format_unit.cpp index 28943de7..b2d1b59a 100644 --- a/zen/format_unit.cpp +++ b/zen/format_unit.cpp @@ -128,9 +128,9 @@ std::wstring roundToBlock(double timeInHigh, std::wstring zen::formatRemainingTime(double timeInSec) { - const int steps10[] = { 1, 2, 5, 10 }; - const int steps24[] = { 1, 2, 3, 4, 6, 8, 12, 24 }; - const int steps60[] = { 1, 2, 5, 10, 15, 20, 30, 60 }; + const int steps10[] = {1, 2, 5, 10}; + const int steps24[] = {1, 2, 3, 4, 6, 8, 12, 24}; + const int steps60[] = {1, 2, 5, 10, 15, 20, 30, 60}; //determine preferred unit double timeInUnit = timeInSec; @@ -178,7 +178,7 @@ std::wstring zen::formatUtcToLocalTime(time_t utcTime) { auto errorMsg = [&] { return _("Error") + L" (time_t: " + numberTo(utcTime) + L')'; }; - TimeComp loc = getLocalTime(utcTime); + const TimeComp& loc = getLocalTime(utcTime); std::wstring dateString = utfTo(formatTime(Zstr("%x %X"), loc)); return !dateString.empty() ? dateString : errorMsg(); -- cgit