diff --git a/format.h b/format.h index b6cbe4fb..1869a0fe 100644 --- a/format.h +++ b/format.h @@ -186,13 +186,12 @@ template <> class CharTraits : public BasicCharTraits { private: // Conversion from wchar_t to char is not supported. - // TODO: rename to ConvertChar - static char ConvertWChar(wchar_t); + static char ConvertChar(wchar_t); public: typedef const wchar_t *UnsupportedStrType; - static char ConvertWChar(char value) { return value; } + static char ConvertChar(char value) { return value; } template static int FormatFloat(char *buffer, std::size_t size, @@ -204,8 +203,8 @@ class CharTraits : public BasicCharTraits { public: typedef const char *UnsupportedStrType; - static wchar_t ConvertWChar(char value) { return value; } - static wchar_t ConvertWChar(wchar_t value) { return value; } + static wchar_t ConvertChar(char value) { return value; } + static wchar_t ConvertChar(wchar_t value) { return value; } template static int FormatFloat(wchar_t *buffer, std::size_t size, @@ -752,7 +751,7 @@ class BasicWriter { } BasicWriter &operator<<(wchar_t value) { - *GrowBuffer(1) = internal::CharTraits::ConvertWChar(value); + *GrowBuffer(1) = internal::CharTraits::ConvertChar(value); return *this; } @@ -768,7 +767,7 @@ class BasicWriter { template BasicWriter &operator<<(const IntFormatSpec &spec) { - internal::CharTraits::ConvertWChar(FillChar()); + internal::CharTraits::ConvertChar(FillChar()); FormatInt(spec.value(), spec); return *this; } @@ -1001,7 +1000,7 @@ class BasicFormatter { : type(LONG_DOUBLE), long_double_value(value), formatter(0) {} Arg(char value) : type(CHAR), int_value(value), formatter(0) {} Arg(wchar_t value) - : type(CHAR), int_value(internal::CharTraits::ConvertWChar(value)), + : type(CHAR), int_value(internal::CharTraits::ConvertChar(value)), formatter(0) {} Arg(const Char *value) : type(STRING), formatter(0) {