]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fs_mem.cpp
Make public headers compatible with Objective-C++ with ARC.
[wxWidgets.git] / src / common / fs_mem.cpp
index 6503834972df834212749f43f23770d2c7a8ad82..281cdbbc8848b3f76f9b9e29e4339d2ef498a268 100644 (file)
@@ -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
 /////////////////////////////////////////////////////////////////////////////
@@ -186,13 +185,9 @@ void wxMemoryFSHandlerBase::AddFileWithMimeType(const wxString& filename,
                                                 const wxString& textdata,
                                                 const wxString& mimetype)
 {
-    AddFileWithMimeType
-    (
-        filename,
-        static_cast<const char *>(textdata.To8BitData()),
-        data.length(),
-        mimetype
-    );
+    const wxCharBuffer buf(textdata.To8BitData());
+
+    AddFileWithMimeType(filename, buf.data(), buf.length(), mimetype);
 }
 
 
@@ -253,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
                                (