]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fs_mem.cpp
Misc validity fixes to samples/xrc/rc/*.xrc.
[wxWidgets.git] / src / common / fs_mem.cpp
index 28b43e826f0aebeb4c6a8dab3ba002501aa25a65..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,15 +185,9 @@ 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
+    const wxCharBuffer buf(textdata.To8BitData());
 
-    AddFileWithMimeType(filename,
-                        static_cast<const char *>(data), data.length(),
-                        mimetype);
+    AddFileWithMimeType(filename, buf.data(), buf.length(), mimetype);
 }
 
 
@@ -255,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
                                (