mirror of
https://github.com/nlohmann/json.git
synced 2026-10-08 07:27:12 +00:00
Merge branch 'json-view/02b-float-parser' into json-view/23-zmij
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
24 files changed
+24298
-363
No files matched your search
@@ -988,10 +988,10 @@ void convert_float_locale_aware(StringType& token, std::size_t decimal_point_pos
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string copy(token.data(), token.size());
|
||||
copy.replace(decimal_point_position, 1, decimal_point);
|
||||
strtof_by_type(value, copy.c_str(), &endptr);
|
||||
complete = endptr == copy.c_str() + copy.size();
|
||||
std::string buffer(token.data(), token.size());
|
||||
buffer.replace(decimal_point_position, 1, decimal_point);
|
||||
strtof_by_type(value, buffer.c_str(), &endptr);
|
||||
complete = endptr == buffer.c_str() + buffer.size();
|
||||
}
|
||||
|
||||
if (JSON_HEDLEY_LIKELY(complete))
|
||||
|
||||
Reference in new issue
Block a user