From 6a033ffca2b8219bb581c013c3bbd6c31f8151ff Mon Sep 17 00:00:00 2001 From: Sebastian Redl Date: Wed, 10 Feb 2016 11:59:18 +0100 Subject: [PATCH] Fix conversion warnings. Pointed out by Joachim Faulhaber. --- include/boost/property_tree/detail/json_parser_write.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/property_tree/detail/json_parser_write.hpp b/include/boost/property_tree/detail/json_parser_write.hpp index 78dbfe4..bba1003 100644 --- a/include/boost/property_tree/detail/json_parser_write.hpp +++ b/include/boost/property_tree/detail/json_parser_write.hpp @@ -51,10 +51,10 @@ namespace boost { namespace property_tree { namespace json_parser unsigned long u = (std::min)(static_cast( static_cast(*b)), 0xFFFFul); - int d1 = u / 4096; u -= d1 * 4096; - int d2 = u / 256; u -= d2 * 256; - int d3 = u / 16; u -= d3 * 16; - int d4 = u; + unsigned long d1 = u / 4096; u -= d1 * 4096; + unsigned long d2 = u / 256; u -= d2 * 256; + unsigned long d3 = u / 16; u -= d3 * 16; + unsigned long d4 = u; result += Ch('\\'); result += Ch('u'); result += Ch(hexdigits[d1]); result += Ch(hexdigits[d2]); result += Ch(hexdigits[d3]); result += Ch(hexdigits[d4]);