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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user