Should compile better if wchar_t is not available.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -264,7 +264,11 @@ WXDLLEXPORT_DATA(extern wxMBConv *) wxConvCurrent;
|
|||||||
#endif
|
#endif
|
||||||
#else//!wxUSE_WCHAR_T
|
#else//!wxUSE_WCHAR_T
|
||||||
class WXDLLEXPORT wxMBConv {};
|
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
|
#endif//wxUSE_WCHAR_T
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
@@ -1164,7 +1164,7 @@ int wxString::PrintfV(const wxChar* pszFormat, va_list argptr)
|
|||||||
char *val = va_arg(argptr, char *);
|
char *val = va_arg(argptr, char *);
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
// ASCII->Unicode constructor handles max_width right
|
// ASCII->Unicode constructor handles max_width right
|
||||||
wxString s(val, wxConv_libc, max_width);
|
wxString s(val, wxConvLibc, max_width);
|
||||||
#else
|
#else
|
||||||
size_t len = wxSTRING_MAXLEN;
|
size_t len = wxSTRING_MAXLEN;
|
||||||
if (val) {
|
if (val) {
|
||||||
@@ -1801,14 +1801,18 @@ void wxArrayString::DoSort()
|
|||||||
// MBConv
|
// MBConv
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
|
WXDLLEXPORT_DATA(wxMBConv *) wxConvCurrent = &wxConvLibc;
|
||||||
|
#if !wxUSE_WCHAR_T
|
||||||
|
WXDLLEXPORT_DATA(wxMBConv) wxConvLibc, wxConvFile;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if wxUSE_WCHAR_T
|
#if wxUSE_WCHAR_T
|
||||||
WXDLLEXPORT_DATA(wxMBConv *) wxConv_current = &wxConv_libc;
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// standard libc conversion
|
// 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
|
size_t wxMBConv::MB2WC(wchar_t *buf, const char *psz, size_t n) const
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user