diff options
| author | Neil <nyamatongwe@gmail.com> | 2018-04-30 07:57:13 +1000 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2018-04-30 07:57:13 +1000 |
| commit | 229b48f2c385130502a82f1f7fc994d04060e616 (patch) | |
| tree | 52d0b2f901a40be0942c9e176134d3d1789fbb7b /src | |
| parent | 3ffa2dd7ffe08149da8618ecd0d264763989ca6e (diff) | |
| download | scintilla-mirror-229b48f2c385130502a82f1f7fc994d04060e616.tar.gz | |
Feature [feature-requests:#1215]. Simplify RESearch::ChSetWithCase.
Diffstat (limited to 'src')
| -rw-r--r-- | src/RESearch.cxx | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/RESearch.cxx b/src/RESearch.cxx index f7ae04974..b368890c3 100644 --- a/src/RESearch.cxx +++ b/src/RESearch.cxx @@ -289,17 +289,12 @@ void RESearch::ChSet(unsigned char c) { } void RESearch::ChSetWithCase(unsigned char c, bool caseSensitive) { - if (caseSensitive) { - ChSet(c); - } else { + ChSet(c); + if (!caseSensitive) { if ((c >= 'a') && (c <= 'z')) { - ChSet(c); - ChSet(static_cast<unsigned char>(c - 'a' + 'A')); + ChSet(c - 'a' + 'A'); } else if ((c >= 'A') && (c <= 'Z')) { - ChSet(c); - ChSet(static_cast<unsigned char>(c - 'A' + 'a')); - } else { - ChSet(c); + ChSet(c - 'A' + 'a'); } } } |
