]> git.saurik.com Git - wxWidgets.git/commitdiff
overload operator<<() for wchar_t too (if applicable/possible); this fixes the proble...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 11 Sep 2004 18:42:58 +0000 (18:42 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 11 Sep 2004 18:42:58 +0000 (18:42 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/txtstrm.h
src/common/txtstrm.cpp

index 83b2f5a002728774c912f4d7aa027bccde426cfb..8cbc1c747b88a034b389fbec445fb374cdebbf5f 100644 (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);
index 27b0b6c6edd50ef673de1c4b12029fb200ca4d79..404f31f59487225079a4444e63600310b5bda2a1 100644 (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;