X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8f1a82e6bbcd743abf9afff7e871f8324db567f3..1b495a94e632986d756f78b2dc2d643da351819e:/src/common/fs_mem.cpp diff --git a/src/common/fs_mem.cpp b/src/common/fs_mem.cpp index 28b43e826f..5f96257100 100644 --- a/src/common/fs_mem.cpp +++ b/src/common/fs_mem.cpp @@ -186,15 +186,9 @@ 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 + const wxCharBuffer buf(textdata.To8BitData()); - AddFileWithMimeType(filename, - static_cast(data), data.length(), - mimetype); + AddFileWithMimeType(filename, buf.data(), buf.length(), mimetype); } @@ -255,7 +249,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 (