From 1967c348184a35007b7fce5da81d7874a51edc3e Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 6 Oct 2016 13:53:02 +1100 Subject: Move MakeLowerCase into CharacterSet.h as that is where MakeUpperCase is. Change the argument and return type of MakeUpperCase to match MakeLowerCase. Move StyleContext::MatchIgnoreCase into StyleContext.cxx as the change of header for MakeLowerCase couldn't be reconciled easily. Add casts as needed. --- lexlib/StyleContext.cxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'lexlib/StyleContext.cxx') diff --git a/lexlib/StyleContext.cxx b/lexlib/StyleContext.cxx index 5bcacb018..f9f15be2e 100644 --- a/lexlib/StyleContext.cxx +++ b/lexlib/StyleContext.cxx @@ -16,11 +16,28 @@ #include "LexAccessor.h" #include "Accessor.h" #include "StyleContext.h" +#include "CharacterSet.h" #ifdef SCI_NAMESPACE using namespace Scintilla; #endif +bool StyleContext::MatchIgnoreCase(const char *s) { + if (MakeLowerCase(ch) != static_cast(*s)) + return false; + s++; + if (MakeLowerCase(chNext) != static_cast(*s)) + return false; + s++; + for (int n = 2; *s; n++) { + if (static_cast(*s) != + MakeLowerCase(static_cast(styler.SafeGetCharAt(currentPos + n, 0)))) + return false; + s++; + } + return true; +} + static void getRange(Sci_PositionU start, Sci_PositionU end, LexAccessor &styler, -- cgit v1.2.3