]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/strconv.cpp
Mention that resource forks are deprecated under Mac in wxCursor docs.
[wxWidgets.git] / src / common / strconv.cpp
index 599048e9e212ca34ca3808274d9a771af780d2e2..f46ccf449845b8d68c0643bd62229697f1bd091d 100644 (file)
@@ -28,8 +28,6 @@
 
 #include "wx/strconv.h"
 
-#if wxUSE_WCHAR_T
-
 #ifndef __WXWINCE__
 #include <errno.h>
 #endif
@@ -539,7 +537,7 @@ const wxWCharBuffer wxMBConv::cMB2WC(const wxScopedCharBuffer& buf) const
         }
     }
 
-    return wxWCharBuffer();
+    return wxScopedWCharBuffer::CreateNonOwned(L"", 0);
 }
 
 const wxCharBuffer wxMBConv::cWC2MB(const wxScopedWCharBuffer& wbuf) const
@@ -557,7 +555,7 @@ const wxCharBuffer wxMBConv::cWC2MB(const wxScopedWCharBuffer& wbuf) const
         }
     }
 
-    return wxCharBuffer();
+    return wxScopedCharBuffer::CreateNonOwned("", 0);
 }
 
 // ----------------------------------------------------------------------------
@@ -3015,10 +3013,9 @@ wxCSConv& wxCSConv::operator=(const wxCSConv& conv)
 void wxCSConv::Clear()
 {
     free(m_name);
-    delete m_convReal;
+    wxDELETE(m_convReal);
 
     m_name = NULL;
-    m_convReal = NULL;
 }
 
 void wxCSConv::SetName(const char *charset)
@@ -3230,7 +3227,7 @@ void wxCSConv::CreateConvIfNeeded() const
 {
     if ( m_deferred )
     {
-        wxCSConv *self = (wxCSConv *)this; // const_cast
+        wxCSConv *self = const_cast<wxCSConv *>(this);
 
         // if we don't have neither the name nor the encoding, use the default
         // encoding for this system
@@ -3455,14 +3452,3 @@ WXDLLIMPEXP_DATA_BASE(wxMBConv *) wxConvFileName =
 #else // !__DARWIN__
                                     wxGet_wxConvLibcPtr();
 #endif // __DARWIN__/!__DARWIN__
-
-#else // !wxUSE_WCHAR_T
-
-// FIXME-UTF8: remove this, wxUSE_WCHAR_T is required now
-// stand-ins in absence of wchar_t
-WXDLLIMPEXP_DATA_BASE(wxMBConv) wxConvLibc,
-                                wxConvISO8859_1,
-                                wxConvLocal,
-                                wxConvUTF8;
-
-#endif // wxUSE_WCHAR_T/!wxUSE_WCHAR_T