From 82b82fd48709429d7e87a72e4c11d1f290bf5752 Mon Sep 17 00:00:00 2001 From: Alex Astashyn Date: Mon, 5 Dec 2016 20:33:28 -0500 Subject: [PATCH] Addressing msvc-specific compilation issues. --- src/json.hpp | 2 +- src/json.hpp.re2c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/json.hpp b/src/json.hpp index 14780ca8..e0d94f77 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 cac41603..87977da6 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; }