diff options
author | Neil <nyamatongwe@gmail.com> | 2016-10-06 13:53:02 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2016-10-06 13:53:02 +1100 |
commit | 1967c348184a35007b7fce5da81d7874a51edc3e (patch) | |
tree | 10f552751ed42c75dc7ce39351741eacc431030b /lexlib/StyleContext.h | |
parent | 27ea5a8c1461bd86dd3b43b679480d8dffc5581b (diff) | |
download | scintilla-mirror-1967c348184a35007b7fce5da81d7874a51edc3e.tar.gz |
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.
Diffstat (limited to 'lexlib/StyleContext.h')
-rw-r--r-- | lexlib/StyleContext.h | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/lexlib/StyleContext.h b/lexlib/StyleContext.h index c8aa4ab02..6cbda358e 100644 --- a/lexlib/StyleContext.h +++ b/lexlib/StyleContext.h @@ -12,13 +12,6 @@ namespace Scintilla { #endif -static inline int MakeLowerCase(int ch) { - if (ch < 'A' || ch > 'Z') - return ch; - else - return ch - 'A' + 'a'; -} - // All languages handled so far can treat all characters >= 0x80 as one class // which just continues the current token or starts an identifier if in default. // DBCS treated specially as the second character can be < 0x80 and hence @@ -204,22 +197,8 @@ public: } return true; } - bool MatchIgnoreCase(const char *s) { - if (MakeLowerCase(ch) != static_cast<unsigned char>(*s)) - return false; - s++; - if (MakeLowerCase(chNext) != static_cast<unsigned char>(*s)) - return false; - s++; - for (int n=2; *s; n++) { - if (static_cast<unsigned char>(*s) != - MakeLowerCase(static_cast<unsigned char>(styler.SafeGetCharAt(currentPos+n, 0)))) - return false; - s++; - } - return true; - } // Non-inline + bool MatchIgnoreCase(const char *s); void GetCurrent(char *s, Sci_PositionU len); void GetCurrentLowered(char *s, Sci_PositionU len); }; |