I have removed wxT() in most cases, leaving it only in:
wxChar* arrays in wxPropertyGrid overview (e.g., here).wxIMAGE_OPTION_* defines.BTW, I think the current description of wxT() may be incorrect:
wxWidgets/interface/wx/chartype.h
Lines 17 to 23 in d0e892a
| @code | |
| #ifdef UNICODE | |
| # define wxT(x) L##x | |
| #else // !Unicode | |
| # define wxT(x) x | |
| #endif | |
| @endcode |
wxWidgets removed non-UNICODE build option in 3.3 and wxChar is always defined as wchar_t (i.e., regardless of the underlying wxString char type, so even in the UTF-8 build), therefore wxT() now always adds L (unlike wxS() which adds it only if wxUSE_UNICODE_WCHAR):
wxWidgets/include/wx/chartype.h
Lines 168 to 178 in d0e892a
| wxT ("wx text") macro turns a literal string constant into a wide char | |
| constant. It is mostly unnecessary with wx 2.9 but defined for | |
| compatibility. | |
| */ | |
| #ifndef wxT | |
| /* | |
| Notice that we use an intermediate macro to allow x to be expanded | |
| if it's a macro itself. | |
| */ | |
| #define wxT(x) wxCONCAT_HELPER(L, x) | |
| #endif /* !defined(wxT) */ |
BTW2, is it not high time to deprecate or even remove wxT_2() macro, its code comment says "wxT_2 exists only for compatibility with wx 2.x"?
https://github.com/wxWidgets/wxWidgets/pull/23436
(12 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Thanks, I've updated wxT() documentation and pushed it here, please let me know if you have any comments. As for wxT_2(), it seems to be used in a few projects, so we shouldn't remove it and so I've left its documentation as well, but made it even more clear that it is obsolete now.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
@vadz pushed 2 commits.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Merged #23436 into master.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Thanks, I have no comments.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()