Use precision from FormatSpec.

This commit is contained in:
Victor Zverovich
2014-06-21 08:32:00 -07:00
parent f8c058e99c
commit b1bbc90919
2 changed files with 14 additions and 17 deletions
+3 -4
View File
@@ -876,9 +876,8 @@ class BasicWriter {
void FormatInt(T value, const Spec &spec);
// Formats a floating-point number (double or long double).
// TODO: use precision from spec
template <typename T>
void FormatDouble(T value, const FormatSpec &spec, int precision);
void FormatDouble(T value, const FormatSpec &spec);
// Formats a string.
template <typename StringChar>
@@ -1221,7 +1220,7 @@ class BasicWriter {
}
BasicWriter &operator<<(double value) {
FormatDouble(value, FormatSpec(), -1);
FormatDouble(value, FormatSpec());
return *this;
}
@@ -1230,7 +1229,7 @@ class BasicWriter {
(``'g'``) and writes it to the stream.
*/
BasicWriter &operator<<(long double value) {
FormatDouble(value, FormatSpec(), -1);
FormatDouble(value, FormatSpec());
return *this;
}