From a4efddba66c064c73ff9814c69dd995175ca767e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 5 Mar 2016 15:52:43 +0100 Subject: [PATCH] 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. --- src/stc/scintilla/src/UniConversion.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stc/scintilla/src/UniConversion.h b/src/stc/scintilla/src/UniConversion.h index aeb13f0c2a..8e1824c08f 100644 --- a/src/stc/scintilla/src/UniConversion.h +++ b/src/stc/scintilla/src/UniConversion.h @@ -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; }