X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c0c133e13b36a923c65f94499554e432bc3a0daa..af4168e2cfbeffbe3b53380471aa31e9ab63a598:/src/common/fs_mem.cpp diff --git a/src/common/fs_mem.cpp b/src/common/fs_mem.cpp index 9cd5628f86..281cdbbc88 100644 --- a/src/common/fs_mem.cpp +++ b/src/common/fs_mem.cpp @@ -2,7 +2,6 @@ // Name: src/common/fs_mem.cpp // Purpose: in-memory file system // Author: Vaclav Slavik -// RCS-ID: $Id$ // Copyright: (c) 2000 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -186,9 +185,9 @@ void wxMemoryFSHandlerBase::AddFileWithMimeType(const wxString& filename, const wxString& textdata, const wxString& mimetype) { - AddFileWithMimeType(filename, - (const void*) textdata.mb_str(), textdata.length(), - mimetype); + const wxCharBuffer buf(textdata.To8BitData()); + + AddFileWithMimeType(filename, buf.data(), buf.length(), mimetype); } @@ -249,7 +248,7 @@ wxMemoryFSHandler::AddFile(const wxString& filename, return; wxMemoryOutputStream mems; - if ( image.Ok() && image.SaveFile(mems, type) ) + if ( image.IsOk() && image.SaveFile(mems, type) ) { m_Hash[filename] = new wxMemoryFSFile (