added wxS(); use it in a couple of places

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-01-02 16:31:38 +00:00
parent 038c03337f
commit a05166568c
4 changed files with 124 additions and 96 deletions

View File

@@ -214,11 +214,9 @@
#endif
/* define char type used by wxString internal representation: */
#if wxUSE_UNICODE_UTF8
typedef char wxStringCharType;
#elif wxUSE_UNICODE_WCHAR
#if wxUSE_UNICODE_WCHAR
typedef wchar_t wxStringCharType;
#else
#else /* wxUSE_UNICODE_UTF8 || ANSI */
typedef char wxStringCharType;
#endif
@@ -243,6 +241,18 @@
#endif /* ASCII/Unicode */
#endif /* !defined(_T) */
/*
wxS ("wx string") macro can be used to create literals using the same
representation as wxString does internally, i.e. wchar_t in Unicode build
under Windows or char in UTF-8-based Unicode builds and (deprecated) ANSI
builds everywhere (see wxStringCharType definition above).
*/
#if wxUSE_UNICODE_WCHAR
#define wxS(x) wxCONCAT_HELPER(L, x)
#else /* wxUSE_UNICODE_UTF8 || ANSI */
#define wxS(x) x
#endif
/* although global macros with such names are normally bad, we want to have */
/* another name for _T() which should be used to avoid confusion between */
/* _T() and _() in wxWidgets sources */