diff --git a/src/json.hpp b/src/json.hpp index 14780ca8c..e0d94f776 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -6429,7 +6429,7 @@ class basic_json while(x and i < s_capacity) { - m_buf[i++] = '0' + abs(x % 10); + m_buf[i++] = static_cast('0' + std::labs(x % 10)); x /= 10; } diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index cac41603e..87977da66 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -6429,7 +6429,7 @@ class basic_json while(x and i < s_capacity) { - m_buf[i++] = '0' + abs(x % 10); + m_buf[i++] = static_cast('0' + std::labs(x % 10)); x /= 10; }