]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fs_mem.cpp
Add wxWindowPtr smart pointer.
[wxWidgets.git] / src / common / fs_mem.cpp
index e306437de465ee11be4fbde3186805ad3ee035e0..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()),
-        wxStrlen(static_cast<const char *>(textdata.To8BitData())),
-        mimetype
-    );
+    const wxCharBuffer buf(textdata.To8BitData());
+
+    AddFileWithMimeType(filename, buf.data(), buf.length(), mimetype);
 }