mirror of
https://github.com/nlohmann/json.git
synced 2026-11-03 03:15:34 +00:00
Simplify the decimal point condition in dump_float
Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
2 files changed
+2
-2
No files matched your search
@@ -2106,7 +2106,7 @@ class serializer
|
||||
const std::size_t decimal_point_len = std::char_traits<char>::length(decimal_point);
|
||||
|
||||
// convert decimal point to '.'
|
||||
if (decimal_point_len != 0 && !(decimal_point_len == 1 && decimal_point[0] == '.'))
|
||||
if ((decimal_point_len > 1) || (decimal_point_len == 1 && decimal_point[0] != '.'))
|
||||
{
|
||||
const auto first = number_buffer.begin();
|
||||
const auto last = first + len;
|
||||
|
||||
Reference in new issue
Block a user