fix conversion of wxString to data in AddFileWithMimeType(wxString, wxString) overload in Unicode build

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60427 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2009-04-28 12:23:48 +00:00
parent c437b3f4e4
commit 8f1a82e6bb

View File

@ -186,8 +186,14 @@ void wxMemoryFSHandlerBase::AddFileWithMimeType(const wxString& filename,
const wxString& textdata,
const wxString& mimetype)
{
#if wxUSE_UNICODE
const wxScopedCharBuffer data(textdata.To8BitData());
#else
const wxString& data = textdata;
#endif
AddFileWithMimeType(filename,
(const void*) textdata.mb_str(), textdata.length(),
static_cast<const char *>(data), data.length(),
mimetype);
}