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

summaryrefslogtreecommitdiff
path: root/source/core/StarLexicalCast.hpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-06-27 19:24:35 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-06-27 19:24:35 +1000
commit14b9689b6d4f4ad5276c88130dc6e449bedc0709 (patch)
tree829e760821fb887470ba2a820d309db1428f7f17 /source/core/StarLexicalCast.hpp
parentc9e889723b7af832322d178975e6e440d6cd3ae5 (diff)
Change formatting to use fmtlib (STILL NEED TO CHANGE TO FMT SYNTAX!)
Diffstat (limited to 'source/core/StarLexicalCast.hpp')
-rw-r--r--source/core/StarLexicalCast.hpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/source/core/StarLexicalCast.hpp b/source/core/StarLexicalCast.hpp
index 2831f95..6359591 100644
--- a/source/core/StarLexicalCast.hpp
+++ b/source/core/StarLexicalCast.hpp
@@ -1,6 +1,7 @@
#ifndef STAR_LEXICAL_CAST_HPP
#define STAR_LEXICAL_CAST_HPP
+#include "StarFormat.hpp"
#include "StarString.hpp"
#include "StarStringView.hpp"
#include "StarMaybe.hpp"
@@ -42,12 +43,8 @@ Type lexicalCast(StringView s, std::ios_base::fmtflags flags = std::ios_base::bo
}
template <class Type>
-std::string toString(Type const& t, std::ios_base::fmtflags flags = std::ios_base::boolalpha) {
- std::stringstream ss;
- ss.flags(flags);
- ss.imbue(std::locale::classic());
- ss << t;
- return ss.str();
+std::string toString(Type const& t) {
+ return fmt::to_string(t);
}
}