Skip to content

Commit c3aecc6

Browse files
forward precision to stringstream
1 parent 7faf207 commit c3aecc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib_json/json_writer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ std::string valueToString(double value, bool useSpecialFloats, unsigned int prec
143143
int len = -1;
144144

145145
std::stringstream value_ss;
146-
value_ss << std::setprecision( 17 ) << value;
146+
value_ss << std::setprecision( precision ) << value;
147147
std::string value_str = value_ss.str();
148148

149149
// Print into the buffer. We need not request the alternative representation

0 commit comments

Comments
 (0)