overload operator<<() for wchar_t too (if applicable/possible); this fixes the problem with << '\n' producing '10' on output

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2004-09-11 18:42:58 +00:00
parent 50531bd2bd
commit 3ca1bf5add
2 changed files with 12 additions and 0 deletions

View File

@ -121,6 +121,9 @@ public:
wxTextOutputStream& operator<<(const wxChar *string);
wxTextOutputStream& operator<<(const wxString& string);
wxTextOutputStream& operator<<(char c);
#if wxUSE_WCHAR_T && wxWCHAR_T_IS_REAL_TYPE
wxTextOutputStream& operator<<(wchar_t wc);
#endif // wxUSE_WCHAR_T
wxTextOutputStream& operator<<(wxInt16 c);
wxTextOutputStream& operator<<(wxInt32 c);
wxTextOutputStream& operator<<(wxUint16 c);

View File

@ -425,6 +425,15 @@ wxTextOutputStream& wxTextOutputStream::operator<<(char c)
return *this;
}
#if wxUSE_WCHAR_T && wxWCHAR_T_IS_REAL_TYPE
wxTextOutputStream& wxTextOutputStream::operator<<(wchar_t wc)
{
WriteString( wxString(&wc, m_conv, 1) );
}
#endif // wxUSE_WCHAR_T
wxTextOutputStream& wxTextOutputStream::operator<<(wxInt16 c)
{
wxString str;