X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flexicalcast.cpp;h=a1270d6d6074d6b4e68d817fe940e1fd9b1da2e2;hb=36f9e78ae75f5e14b132f37d249340ad3480b8ce;hp=cdd55780b5f612ee86cce7db6beee8c64d80502f;hpb=f9e0275e476540c1b5d61c03a6a87d521856059b;p=libs%2Fcore.git diff --git a/source/lexicalcast.cpp b/source/lexicalcast.cpp index cdd5578..a1270d6 100644 --- a/source/lexicalcast.cpp +++ b/source/lexicalcast.cpp @@ -119,7 +119,7 @@ char *int_to_str(T v, const Fmt &f, char *end) template string int_to_str(T v, const Fmt &f) { - unsigned size=max(f.get_width(), max(f.get_precision(), sizeof(T)*8+3)); + unsigned size=max(f.get_width(), max(f.get_precision(), sizeof(T)*8+3)); char *buf=new char[size]; string result(int_to_str(v, f, buf+size), buf+size); delete[] buf; @@ -305,7 +305,7 @@ string flt_to_str(T v, const Fmt &f) } // Apply rounding - w+=5.0l/pow(10.0l, digits); + w+=5.0l/pow(10.0l, static_cast(digits)); if(w>10) { // Rounding bumped us to the next exponent, deal with it