Mercurial > minori
diff src/core/time.cc @ 211:7cf53145de11
strings: use templates for ToInt, std::to_string -> Strings::ToUtf8String
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Sun, 07 Jan 2024 09:54:17 -0500 |
parents | 168382a89b21 |
children | 91ac90a34003 |
line wrap: on
line diff
--- a/src/core/time.cc Tue Jan 02 02:37:03 2024 -0500 +++ b/src/core/time.cc Sun Jan 07 09:54:17 2024 -0500 @@ -1,4 +1,6 @@ #include "core/time.h" +#include "core/strings.h" + #include <cassert> #include <cmath> #include <cstdint> @@ -15,7 +17,7 @@ std::string result; auto get = [](int64_t val, const std::string& s, const std::string& p) { - return std::to_string(val) + " " + (val == 1 ? s : p); + return Strings::ToUtf8String(val) + " " + (val == 1 ? s : p); }; if (InSeconds() < 60) @@ -61,4 +63,4 @@ return *reinterpret_cast<int64_t*>(&t); } -} // namespace Time \ No newline at end of file +} // namespace Time