const wxString& textdata,
const wxString& mimetype)
{
-#if wxUSE_UNICODE
- const wxScopedCharBuffer data(textdata.To8BitData());
-#else
- const wxString& data = textdata;
-#endif
-
- AddFileWithMimeType(filename,
- static_cast<const char *>(data), data.length(),
- mimetype);
+ AddFileWithMimeType
+ (
+ filename,
+ static_cast<const char *>(textdata.To8BitData()),
+ wxStrlen(static_cast<const char *>(textdata.To8BitData())),
+ mimetype
+ );
}
return;
wxMemoryOutputStream mems;
- if ( image.Ok() && image.SaveFile(mems, type) )
+ if ( image.IsOk() && image.SaveFile(mems, type) )
{
m_Hash[filename] = new wxMemoryFSFile
(