]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fs_mem.cpp
Make wxSpinCtrlGeneric usable as wxDVC editor control.
[wxWidgets.git] / src / common / fs_mem.cpp
index 28b43e826f0aebeb4c6a8dab3ba002501aa25a65..3ad28089e663f8bac2fbd979096e2f1f5950ddd3 100644 (file)
@@ -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<const char *>(data), data.length(),
-                        mimetype);
+    AddFileWithMimeType
+    (
+        filename,
+        static_cast<const char *>(textdata.To8BitData()),
+        wxStrlen(static_cast<const char *>(textdata.To8BitData())),
+        mimetype
+    );
 }