X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c8c86bd0ba6afbdea60fb6c6986cb72e2d750a8d..931d6a47c32a5b4c283243cb553ce71ee2b535d5:/src/common/fs_mem.cpp diff --git a/src/common/fs_mem.cpp b/src/common/fs_mem.cpp index 2e9927590d..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 ///////////////////////////////////////////////////////////////////////////// @@ -70,7 +69,7 @@ private: #endif // wxUSE_DATETIME } - DECLARE_NO_COPY_CLASS(wxMemoryFSFile) + wxDECLARE_NO_COPY_CLASS(wxMemoryFSFile); }; #if wxUSE_BASE @@ -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 (