From ece68e715d9a4b2056c30cb31c68bdc8be005227 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Thu, 1 Feb 2024 02:16:58 +0300 Subject: [PATCH] std::stod replaced to std::from_chars --- src/coders/xml.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/coders/xml.cpp b/src/coders/xml.cpp index 54d97c2c..c93516ab 100644 --- a/src/coders/xml.cpp +++ b/src/coders/xml.cpp @@ -1,5 +1,6 @@ #include "xml.h" +#include #include #include #include "../util/stringutil.h" @@ -24,7 +25,9 @@ int64_t Attribute::asInt() const { } double Attribute::asFloat() const { - return std::stod(text); + double value; + std::from_chars(text.data(), text.data()+text.size(), value); + return value; } bool Attribute::asBool() const {