diff --git a/src/json.hpp b/src/json.hpp index 44848553f..1b1939c4e 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -5539,10 +5539,10 @@ class basic_json case value_t::number_float: { - // If the number is an integer then output as a fixed with with precision 1 - // to output "0.0", "1.0" etc as expected for some round trip tests otherwise + // If the number is an integer then output as a fixed with with precision 1 + // to output "0.0", "1.0" etc as expected for some round trip tests otherwise // 15 digits of precision allows round-trip IEEE 754 string->double->string; - // to be safe, we read this value from std::numeric_limits::digits10 + // to be safe, we read this value from std::numeric_limits::digits10 if (std::fmod(m_value.number_float, 1) == 0) o << std::fixed << std::setprecision(1); else o << std::defaultfloat << std::setprecision(std::numeric_limits::digits10); o << m_value.number_float; diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index 1d7e4a037..873f9be8d 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -5539,10 +5539,10 @@ class basic_json case value_t::number_float: { - // If the number is an integer then output as a fixed with with precision 1 - // to output "0.0", "1.0" etc as expected for some round trip tests otherwise + // If the number is an integer then output as a fixed with with precision 1 + // to output "0.0", "1.0" etc as expected for some round trip tests otherwise // 15 digits of precision allows round-trip IEEE 754 string->double->string; - // to be safe, we read this value from std::numeric_limits::digits10 + // to be safe, we read this value from std::numeric_limits::digits10 if (std::fmod(m_value.number_float, 1) == 0) o << std::fixed << std::setprecision(1); else o << std::defaultfloat << std::setprecision(std::numeric_limits::digits10); o << m_value.number_float;