aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexlib/CharacterSet.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2016-10-06 13:53:02 +1100
committerNeil <nyamatongwe@gmail.com>2016-10-06 13:53:02 +1100
commit1967c348184a35007b7fce5da81d7874a51edc3e (patch)
tree10f552751ed42c75dc7ce39351741eacc431030b /lexlib/CharacterSet.h
parent27ea5a8c1461bd86dd3b43b679480d8dffc5581b (diff)
downloadscintilla-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/CharacterSet.h')
-rw-r--r--lexlib/CharacterSet.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/lexlib/CharacterSet.h b/lexlib/CharacterSet.h
index a0c45b2fb..183fbe421 100644
--- a/lexlib/CharacterSet.h
+++ b/lexlib/CharacterSet.h
@@ -160,13 +160,20 @@ inline bool isoperator(int ch) {
// Simple case functions for ASCII.
-inline char MakeUpperCase(char ch) {
+inline int MakeUpperCase(int ch) {
if (ch < 'a' || ch > 'z')
return ch;
else
return static_cast<char>(ch - 'a' + 'A');
}
+inline int MakeLowerCase(int ch) {
+ if (ch < 'A' || ch > 'Z')
+ return ch;
+ else
+ return ch - 'A' + 'a';
+}
+
int CompareCaseInsensitive(const char *a, const char *b);
int CompareNCaseInsensitive(const char *a, const char *b, size_t len);