Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/core
diff options
context:
space:
mode:
Diffstat (limited to 'source/core')
-rw-r--r--source/core/StarFormat.hpp5
-rw-r--r--source/core/StarLexicalCast.hpp5
-rw-r--r--source/core/StarLogging.hpp2
3 files changed, 6 insertions, 6 deletions
diff --git a/source/core/StarFormat.hpp b/source/core/StarFormat.hpp
index c31697f..f159928 100644
--- a/source/core/StarFormat.hpp
+++ b/source/core/StarFormat.hpp
@@ -40,6 +40,11 @@ void cerrf(char const* fmt, Args const&... args) {
std::cerr.flush();
}
+template <class Type>
+inline std::string toString(Type const& t) {
+ return fmt::to_string(t);
+}
+
}
#endif
diff --git a/source/core/StarLexicalCast.hpp b/source/core/StarLexicalCast.hpp
index 40e6d6d..abda912 100644
--- a/source/core/StarLexicalCast.hpp
+++ b/source/core/StarLexicalCast.hpp
@@ -42,11 +42,6 @@ Type lexicalCast(StringView s, std::ios_base::fmtflags flags = std::ios_base::bo
throw BadLexicalCast(strf("Lexical cast failed on '{}'", s));
}
-template <class Type>
-std::string toString(Type const& t) {
- return fmt::to_string(t);
-}
-
}
#endif
diff --git a/source/core/StarLogging.hpp b/source/core/StarLogging.hpp
index ae47e40..3e71aff 100644
--- a/source/core/StarLogging.hpp
+++ b/source/core/StarLogging.hpp
@@ -185,7 +185,7 @@ void Logger::error(char const* msg, Args const&... args) {
template <typename T>
void LogMap::set(String const& key, T const& t) {
- setValue(key, strf("{}", t));
+ setValue(key, toString(t));
}
}