Don't mention ANSI build in wx/strvararg.h comments any longer
Also remove an "#else" branch which is never taken any more. No real changes.
This commit is contained in:
parent
2d1928e6aa
commit
68a05fd5b8
1 changed files with 9 additions and 24 deletions
|
|
@ -43,7 +43,6 @@ wxGCC_WARNING_SUPPRESS(ctor-dtor-privacy)
|
|||
// arguments passed in so that they are of the type expected by variadic
|
||||
// functions taking string arguments, i.e., char* or wchar_t*, depending on the
|
||||
// build:
|
||||
// * char* in the current locale's charset in ANSI build
|
||||
// * char* with UTF-8 encoding if wxUSE_UNICODE_UTF8 and the app is running
|
||||
// under an UTF-8 locale
|
||||
// * wchar_t* if wxUSE_UNICODE_WCHAR or if wxUSE_UNICODE_UTF8 and the current
|
||||
|
|
@ -72,7 +71,7 @@ wxGCC_WARNING_SUPPRESS(ctor-dtor-privacy)
|
|||
// impl Name of the variadic function that implements 'name' for
|
||||
// the native strings representation (wchar_t* if
|
||||
// wxUSE_UNICODE_WCHAR or wxUSE_UNICODE_UTF8 when running under
|
||||
// non-UTF8 locale, char* in ANSI build) [wxCrt_Fprintf]
|
||||
// non-UTF8 locale, char* otherwise) [wxCrt_Fprintf]
|
||||
// implUtf8 Like 'impl', but for the UTF-8 char* version to be used
|
||||
// if wxUSE_UNICODE_UTF8 and running under UTF-8 locale
|
||||
// (ignored otherwise) [fprintf]
|
||||
|
|
@ -446,15 +445,14 @@ struct wxArgNormalizer
|
|||
}
|
||||
|
||||
// Returns the value in a form that can be safely passed to real vararg
|
||||
// functions. In case of strings, this is char* in ANSI build and wchar_t*
|
||||
// in Unicode build.
|
||||
// functions. In case of strings, this is char* in UTF-8-only build and
|
||||
// wchar_t* otherwise.
|
||||
T get() const { return m_value; }
|
||||
|
||||
T m_value;
|
||||
};
|
||||
|
||||
// normalizer for passing arguments to functions working with wchar_t* (and
|
||||
// until ANSI build is removed, char* in ANSI build as well - FIXME-UTF8)
|
||||
// normalizer for passing arguments to functions working with wchar_t*
|
||||
// string representation
|
||||
#if !wxUSE_UTF8_LOCALE_ONLY
|
||||
template<typename T>
|
||||
|
|
@ -563,8 +561,8 @@ struct WXDLLIMPEXP_BASE wxArgNormalizerWchar<const wxCStrData&>
|
|||
#endif // wxUSE_UNICODE_UTF8 && !wxUSE_UTF8_LOCALE_ONLY
|
||||
|
||||
|
||||
// C string pointers of the wrong type (wchar_t* for ANSI or UTF8 build,
|
||||
// char* for wchar_t Unicode build or UTF8):
|
||||
// C string pointers of the wrong type (wchar_t* for UTF-8-only build,
|
||||
// char* otherwise):
|
||||
#if wxUSE_UNICODE_WCHAR
|
||||
|
||||
#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
|
||||
|
|
@ -578,7 +576,7 @@ struct wxArgNormalizerWchar<const char*>
|
|||
};
|
||||
#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
|
||||
|
||||
#elif wxUSE_UNICODE_UTF8
|
||||
#else // wxUSE_UNICODE_UTF8
|
||||
|
||||
template<>
|
||||
struct wxArgNormalizerUtf8<const wchar_t*>
|
||||
|
|
@ -629,20 +627,7 @@ struct wxArgNormalizerWchar<const char*>
|
|||
};
|
||||
#endif // !wxUSE_UTF8_LOCALE_ONLY && !defined wxNO_IMPLICIT_WXSTRING_ENCODING
|
||||
|
||||
#else // ANSI - FIXME-UTF8
|
||||
|
||||
#ifndef wxNO_IMPLICIT_WXSTRING_ENCODING
|
||||
template<>
|
||||
struct wxArgNormalizerWchar<const wchar_t*>
|
||||
: public wxArgNormalizerWithBuffer<char>
|
||||
{
|
||||
wxArgNormalizerWchar(const wchar_t* s,
|
||||
const wxFormatString *fmt, unsigned index)
|
||||
: wxArgNormalizerWithBuffer<char>(wxConvLibc.cWC2MB(s), fmt, index) {}
|
||||
};
|
||||
#endif // wxNO_IMPLICIT_WXSTRING_ENCODING
|
||||
|
||||
#endif // wxUSE_UNICODE_WCHAR/wxUSE_UNICODE_UTF8/ANSI
|
||||
#endif // wxUSE_UNICODE_WCHAR/wxUSE_UNICODE_UTF8
|
||||
|
||||
|
||||
#ifdef wxNO_IMPLICIT_WXSTRING_ENCODING
|
||||
|
|
@ -1160,7 +1145,7 @@ private:
|
|||
else \
|
||||
_WX_VARARG_DO_CALL0_WCHAR(return_kw, impl, implUtf8, numfixed)
|
||||
#endif // wxUSE_UTF8_LOCALE_ONLY or not
|
||||
#else // wxUSE_UNICODE_WCHAR or ANSI
|
||||
#else // wxUSE_UNICODE_WCHAR
|
||||
#define _WX_VARARG_DO_CALL _WX_VARARG_DO_CALL_WCHAR
|
||||
#define _WX_VARARG_DO_CALL0 _WX_VARARG_DO_CALL0_WCHAR
|
||||
#endif // wxUSE_UNICODE_UTF8 / wxUSE_UNICODE_WCHAR
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue