diff options
| author | 2025-03-01 16:06:32 +0000 | |
|---|---|---|
| committer | 2025-03-01 16:06:32 +0000 | |
| commit | 32a127d2e0c0a624d12cf9570905fec264554550 (patch) | |
| tree | cdb0a259159753d4479ae36799256d1d807779d0 /src/helperfuncs.cpp | |
| parent | Release v4.6.0. (diff) | |
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.
Diffstat (limited to 'src/helperfuncs.cpp')
| -rw-r--r-- | src/helperfuncs.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |
