forward precision to stringstream

This commit is contained in:
Stefano Fiorentino 2016-02-12 12:58:44 +01:00
parent 7faf207d06
commit c3aecc6831

View File

@ -143,7 +143,7 @@ std::string valueToString(double value, bool useSpecialFloats, unsigned int prec
int len = -1;
std::stringstream value_ss;
value_ss << std::setprecision( 17 ) << value;
value_ss << std::setprecision( precision ) << value;
std::string value_str = value_ss.str();
// Print into the buffer. We need not request the alternative representation