]> git.saurik.com Git - wxWidgets.git/commitdiff
Should compile better if wchar_t is not available.
authorOve Kaaven <ovek@arcticnet.no>
Fri, 30 Apr 1999 17:14:48 +0000 (17:14 +0000)
committerOve Kaaven <ovek@arcticnet.no>
Fri, 30 Apr 1999 17:14:48 +0000 (17:14 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/string.h
src/common/string.cpp

index d9894c0bce169aad2c3fc3b816b37876e9fb9b49..2ad17f489604a4b8a40258e93c49ef66e1d33487 100644 (file)
@@ -264,7 +264,11 @@ WXDLLEXPORT_DATA(extern wxMBConv *) wxConvCurrent;
 #endif
 #else//!wxUSE_WCHAR_T
 class WXDLLEXPORT wxMBConv {};
-WXDLLEXPORT_DATA(extern wxMBConv) wxConvLibc;
+WXDLLEXPORT_DATA(extern wxMBConv) wxConvLibc, wxConvFile;
+#define wxConv_libc wxConvLibc
+#define wxConv_file wxConvFile
+WXDLLEXPORT_DATA(extern wxMBConv *) wxConvCurrent;
+#define wxConv_current wxConvCurrent
 #endif//wxUSE_WCHAR_T
 
 // ---------------------------------------------------------------------------
index 95f21cd712afb4b1549f1d44bd425239ea0cceae..7ebd31772944227db30811f093417f5c22d934b0 100644 (file)
@@ -1164,7 +1164,7 @@ int wxString::PrintfV(const wxChar* pszFormat, va_list argptr)
            char *val = va_arg(argptr, char *);
 #if wxUSE_UNICODE
            // ASCII->Unicode constructor handles max_width right
-           wxString s(val, wxConv_libc, max_width);
+           wxString s(val, wxConvLibc, max_width);
 #else
            size_t len = wxSTRING_MAXLEN;
            if (val) {
@@ -1801,14 +1801,18 @@ void wxArrayString::DoSort()
 // MBConv
 // ============================================================================
 
+WXDLLEXPORT_DATA(wxMBConv *) wxConvCurrent = &wxConvLibc;
+#if !wxUSE_WCHAR_T
+WXDLLEXPORT_DATA(wxMBConv) wxConvLibc, wxConvFile;
+#endif
+
 #if wxUSE_WCHAR_T
-WXDLLEXPORT_DATA(wxMBConv *) wxConv_current = &wxConv_libc;
 
 // ----------------------------------------------------------------------------
 // standard libc conversion
 // ----------------------------------------------------------------------------
 
-WXDLLEXPORT_DATA(wxMBConv) wxConv_libc;
+WXDLLEXPORT_DATA(wxMBConv) wxConvLibc;
 
 size_t wxMBConv::MB2WC(wchar_t *buf, const char *psz, size_t n) const
 {