X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8f1a82e6bbcd743abf9afff7e871f8324db567f3..f2049b683752950d1fe91aec07318e7f2122ff16:/src/common/fs_mem.cpp diff --git a/src/common/fs_mem.cpp b/src/common/fs_mem.cpp index 28b43e826f..e306437de4 100644 --- a/src/common/fs_mem.cpp +++ b/src/common/fs_mem.cpp @@ -186,15 +186,13 @@ 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, - static_cast(data), data.length(), - mimetype); + AddFileWithMimeType + ( + filename, + static_cast(textdata.To8BitData()), + wxStrlen(static_cast(textdata.To8BitData())), + mimetype + ); } @@ -255,7 +253,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 (