diff options
| author | 2025-03-02 00:57:33 +0000 | |
|---|---|---|
| committer | 2025-03-02 00:57:33 +0000 | |
| commit | 7c4830ac78633dac678bfd1d76ecb2534255201f (patch) | |
| tree | 75bf7767e38eef210eeffac6f3b5508e7d6f97e3 /include | |
| parent | Use from_chars instead of istringstream in ConvToNum. (diff) | |
| parent | Fix a compiler error in helperfuncs. (diff) | |
Merge branch 'insp4' into master.
Diffstat (limited to 'include')
| -rw-r--r-- | include/modules/httpd.h | 2 | ||||
| -rw-r--r-- | include/timeutils.h | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/include/modules/httpd.h b/include/modules/httpd.h index 903bd9817..c1cc17b19 100644 --- a/include/modules/httpd.h +++ b/include/modules/httpd.h @@ -72,7 +72,7 @@ public: bool getBool(const std::string& key, bool def = false) const { - return getNum<bool>(key, def); + return !!getNum<uint8_t>(key, def); } }; diff --git a/include/timeutils.h b/include/timeutils.h index 962c1c946..c6a23bebd 100644 --- a/include/timeutils.h +++ b/include/timeutils.h @@ -29,10 +29,9 @@ namespace Duration * seconds. If called with this duration 33,019,565 will be returned. * * @param str A string containing a duration. - * @param base The base time to use for leap year calculation. * @return Either the number of seconds in the duration or 0 on error. */ - CoreExport unsigned long From(const std::string& str, time_t base = 0); + CoreExport unsigned long From(const std::string& str); /** Determines whether a duration string is valid. * @param str The duration string to check. @@ -58,7 +57,7 @@ namespace Duration * @param base The base time to use for leap year calculation. * @return True if the conversion succeeded; otherwise, false. */ - CoreExport bool TryFrom(const std::string& str, unsigned long& duration, time_t base = 0); + CoreExport bool TryFrom(const std::string& str, unsigned long& duration); } namespace Time |
