From ed3d26311aa4debde1823e150de72e57955e3c43 Mon Sep 17 00:00:00 2001 From: Stefano Fiorentino Date: Fri, 12 Feb 2016 11:52:55 +0100 Subject: [PATCH] using unsigned int to solve C.I. detected issues --- src/lib_json/json_writer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib_json/json_writer.cpp b/src/lib_json/json_writer.cpp index 1ac1462..2ab7f79 100644 --- a/src/lib_json/json_writer.cpp +++ b/src/lib_json/json_writer.cpp @@ -141,7 +141,7 @@ std::string valueToString(double value, bool useSpecialFloats, unsigned int prec char buffer[32]; int len = -1; - int length = (value==0.0)?1:(int)(std::floor(std::log10(std::abs(value)))+1); + unsigned int length = (value==0.0)?(unsigned int)1:(unsigned int)(std::floor(std::log10(std::abs(value)))+1); if (length<1) length=1; char formatString[6];