diff --git a/src/common/fs_mem.cpp b/src/common/fs_mem.cpp index 28b43e826f..6503834972 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()), + data.length(), + mimetype + ); }