using unsigned int to solve C.I. detected issues

This commit is contained in:
Stefano Fiorentino 2016-02-12 11:52:55 +01:00
parent 2f8b38266c
commit ed3d26311a

View File

@ -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];