X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c22eea9c9ff11cf122cebdd06f796ba6cc6e3ba0..ddabd45b6148976e174ca7487ab283517d8825df:/src/common/txtstrm.cpp diff --git a/src/common/txtstrm.cpp b/src/common/txtstrm.cpp index e516fb4130..f7d6c09efd 100644 --- a/src/common/txtstrm.cpp +++ b/src/common/txtstrm.cpp @@ -426,6 +426,19 @@ wxTextOutputStream& wxTextOutputStream::PutChar(wxChar c) return *this; } +void wxTextOutputStream::Flush() +{ +#if wxUSE_UNICODE + const size_t len = m_conv->FromWChar(NULL, 0, L"", 1); + if ( len > m_conv->GetMBNulLen() ) + { + wxCharBuffer buf(len); + m_conv->FromWChar(buf.data(), len, L"", 1); + m_output.Write(buf, len - m_conv->GetMBNulLen()); + } +#endif // wxUSE_UNICODE +} + wxTextOutputStream& wxTextOutputStream::operator<<(const wxString& string) { WriteString( string );