diff options
Diffstat (limited to 'base/cprintf_formats.hh')
-rw-r--r-- | base/cprintf_formats.hh | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/base/cprintf_formats.hh b/base/cprintf_formats.hh index 1e5de4fdf..b921c0506 100644 --- a/base/cprintf_formats.hh +++ b/base/cprintf_formats.hh @@ -43,8 +43,10 @@ struct Format int precision; int width; - Format() { } - void clear() { + Format() { clear(); } + + void clear() + { alternate_form = false; flush_left = false; print_sign = false; @@ -58,15 +60,6 @@ struct Format } }; -inline void -format_invalid(std::ostream &out) -{ - using namespace std; - - out << "format invalid!!!" << endl; -} - - template <typename T> inline void _format_char(std::ostream &out, const T& data, Format &fmt) @@ -233,7 +226,7 @@ _format_string(std::ostream &out, const T& data, Format &fmt) template <typename T> inline void format_char(std::ostream &out, const T& data, Format &fmt) -{ format_invalid(out); } +{ out << "<bad arg type for char format>"; } inline void format_char(std::ostream &out, char data, Format &fmt) @@ -329,7 +322,7 @@ format_integer(std::ostream &out, unsigned long long data, Format &fmt) template <typename T> inline void format_float(std::ostream &out, const T& data, Format &fmt) -{ format_invalid(out); } +{ out << "<bad arg type for float format>"; } inline void format_float(std::ostream &out, float data, Format &fmt) |