]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/txtstrm.cpp
Forgot header with OSX prefix
[wxWidgets.git] / src / common / txtstrm.cpp
index e516fb413034221ee8f7fcb8dd5cc965f2688e39..f7d6c09efd66d542d993168acdf42736f69146e0 100644 (file)
@@ -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 );