fixed operator<<(ostream&, wxString) to output string contents and not wchar_t pointer value in Unicode build

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2007-10-09 00:01:59 +00:00
parent 6919e3bb38
commit 7a906e1a21
2 changed files with 4 additions and 5 deletions

View File

@ -3031,7 +3031,7 @@ WXDLLIMPEXP_BASE wxSTD ostream& operator<<(wxSTD ostream&, const wxCharBuffer&);
WXDLLIMPEXP_BASE wxSTD ostream& operator<<(wxSTD ostream&, const wxWCharBuffer&);
#endif
#endif // wxSTD_STRING_COMPATIBILITY
#endif // wxUSE_STD_IOSTREAM
// ---------------------------------------------------------------------------
// wxCStrData implementation

View File

@ -72,11 +72,10 @@ const size_t wxString::npos = (size_t) -1;
wxSTD ostream& operator<<(wxSTD ostream& os, const wxCStrData& str)
{
// FIXME-UTF8: always, not only if wxUSE_UNICODE
#if wxUSE_UNICODE && !defined(__BORLANDC__)
return os << (const wchar_t*)str.AsWCharBuf();
#if wxUSE_UNICODE && !wxUSE_UNICODE_UTF8
return os << (const char *)str.AsCharBuf();
#else
return os << (const char*)str.AsCharBuf();
return os << str.AsInternal();
#endif
}