aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <nyamatongwe@gmail.com>2013-09-10 16:38:11 +1000
committernyamatongwe <nyamatongwe@gmail.com>2013-09-10 16:38:11 +1000
commit9fe961e0f99ceb5ade73c96f2409a039dad4992a (patch)
tree34b4d0864e12e963a93479214d71d4402447b49e
parentbbfea9ca4e14961ecad7bd62acc868c0f4a2adaa (diff)
downloadscintilla-mirror-9fe961e0f99ceb5ade73c96f2409a039dad4992a.tar.gz
Cast away char subscripts to avoid warnings from clang.
-rw-r--r--lexlib/WordList.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/lexlib/WordList.cxx b/lexlib/WordList.cxx
index eb91692d7..a325833d4 100644
--- a/lexlib/WordList.cxx
+++ b/lexlib/WordList.cxx
@@ -32,11 +32,11 @@ static char **ArrayFromWordList(char *wordlist, int *len, bool onlyLineEnds = fa
for (int i=0; i<256; i++) {
wordSeparator[i] = false;
}
- wordSeparator['\r'] = true;
- wordSeparator['\n'] = true;
+ wordSeparator[static_cast<unsigned int>('\r')] = true;
+ wordSeparator[static_cast<unsigned int>('\n')] = true;
if (!onlyLineEnds) {
- wordSeparator[' '] = true;
- wordSeparator['\t'] = true;
+ wordSeparator[static_cast<unsigned int>(' ')] = true;
+ wordSeparator[static_cast<unsigned int>('\t')] = true;
}
for (int j = 0; wordlist[j]; j++) {
int curr = static_cast<unsigned char>(wordlist[j]);
@@ -163,7 +163,7 @@ bool WordList::InList(const char *s) const {
j++;
}
}
- j = starts['^'];
+ j = starts[static_cast<unsigned int>('^')];
if (j >= 0) {
while (words[j][0] == '^') {
const char *a = words[j] + 1;
@@ -215,7 +215,7 @@ bool WordList::InListAbbreviated(const char *s, const char marker) const {
j++;
}
}
- j = starts['^'];
+ j = starts[static_cast<unsigned int>('^')];
if (j >= 0) {
while (words[j][0] == '^') {
const char *a = words[j] + 1;