We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
std::from_chars
1 parent ffab835 commit f1c2b8eCopy full SHA for f1c2b8e
1 file changed
src/script_parser.cpp
@@ -225,10 +225,7 @@ class ScriptParser
225
if(tok.type == TokenType::Real)
226
{
227
advance();
228
- double val = 0;
229
- const char* first = tok.text.data();
230
- const char* last = first + tok.text.size();
231
- std::from_chars(first, last, val);
+ double val = convertFromString<double>(tok.text);
232
return std::make_shared<Ast::ExprLiteral>(Any(val));
233
}
234
// String literal
0 commit comments