aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/RESearch.cxx13
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');
}
}
}