From 32a127d2e0c0a624d12cf9570905fec264554550 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 1 Mar 2025 16:06:32 +0000 Subject: Avoid the use of ConvToStr in string concatenation. This function calls INSP_FORMAT in most cases nowadays so we may as well just call that manually. --- src/helperfuncs.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/helperfuncs.cpp') diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index a43c4d9dd..c81a9fa0f 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -403,7 +403,7 @@ static constexpr unsigned int duration_multi[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; -bool Duration::TryFrom(const std::string& str, unsigned long& duration) +bool Duration::TryFrom(const std::string& str, unsigned long& duration, time_t base) { unsigned long total = 0; unsigned long subtotal = 0; @@ -437,10 +437,10 @@ bool Duration::TryFrom(const std::string& str, unsigned long& duration) return true; } -unsigned long Duration::From(const std::string& str) +unsigned long Duration::From(const std::string& str, time_t base) { unsigned long out = 0; - Duration::TryFrom(str, out); + Duration::TryFrom(str, out, base); return out; } -- cgit v1.3.1-10-gc9f91