Restore fix to wchar_t comparison lost during 3.6.3 merge

This is required to avoid gcc warnings (and possibly errors with other
compilers) about ambiguous comparison operators due to our (wchar_t,
wxUniChar) overloads defined in wx/unichar.h.
This commit is contained in:
Vadim Zeitlin
2016-03-05 15:52:43 +01:00
parent fa18eac81e
commit a4efddba66

View File

@@ -61,7 +61,8 @@ enum { SURROGATE_TRAIL_FIRST = 0xDC00 };
enum { SURROGATE_TRAIL_LAST = 0xDFFF };
enum { SUPPLEMENTAL_PLANE_FIRST = 0x10000 };
inline unsigned int UTF16CharLength(wchar_t uch) {
inline unsigned int UTF16CharLength(wchar_t wch) {
const int uch = wch;
return ((uch >= SURROGATE_LEAD_FIRST) && (uch <= SURROGATE_LEAD_LAST)) ? 2 : 1;
}