From: Guilhem Lavaux Date: Tue, 13 Jul 1999 06:27:42 +0000 (+0000) Subject: * Changed char to wxChar in operators. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/940ddb190cb3f67f3b1eb85c29133e829c3ab762?ds=inline * Changed char to wxChar in operators. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/txtstrm.h b/include/wx/txtstrm.h index 3a951f2633..2fc0ac7aa7 100644 --- a/include/wx/txtstrm.h +++ b/include/wx/txtstrm.h @@ -33,10 +33,9 @@ public: // Operators wxTextInputStream& operator>>(wxString& line); - wxTextInputStream& operator>>(wxInt8& c); + wxTextInputStream& operator>>(wxChar& c); wxTextInputStream& operator>>(wxInt16& i); wxTextInputStream& operator>>(wxInt32& i); - wxTextInputStream& operator>>(wxUint8& c); wxTextInputStream& operator>>(wxUint16& i); wxTextInputStream& operator>>(wxUint32& i); wxTextInputStream& operator>>(double& i); @@ -59,10 +58,9 @@ class WXDLLEXPORT wxTextOutputStream { wxTextOutputStream& operator<<(const wxChar *string); wxTextOutputStream& operator<<(const wxString& string); - wxTextOutputStream& operator<<(wxInt8 c); + wxTextOutputStream& operator<<(wxChar c); wxTextOutputStream& operator<<(wxInt16 c); wxTextOutputStream& operator<<(wxInt32 c); - wxTextOutputStream& operator<<(wxUint8 c); wxTextOutputStream& operator<<(wxUint16 c); wxTextOutputStream& operator<<(wxUint32 c); wxTextOutputStream& operator<<(double f); diff --git a/src/common/txtstrm.cpp b/src/common/txtstrm.cpp index 4a0695da03..6475674cb0 100644 --- a/src/common/txtstrm.cpp +++ b/src/common/txtstrm.cpp @@ -189,9 +189,12 @@ wxTextInputStream& wxTextInputStream::operator>>(wxString& line) return *this; } -wxTextInputStream& wxTextInputStream::operator>>(char& c) +wxTextInputStream& wxTextInputStream::operator>>(wxChar& c) { - m_input->Read(&c, 1); + // TODO +/* + m_input->Read(&c, sizeof(wxChar)); +*/ return *this; } @@ -294,9 +297,11 @@ wxTextOutputStream& wxTextOutputStream::operator<<(const wxString& string) return *this; } -wxTextOutputStream& wxTextOutputStream::operator<<(char c) +wxTextOutputStream& wxTextOutputStream::operator<<(wxChar c) { - m_output->Write(&c, 1); + wxString tmp_str; + tmp_str.Printf("%c", c); + WriteString(tmp_str); return *this; }