From 399e79b90d077755af68dda07195068b151f5589 Mon Sep 17 00:00:00 2001 From: Unknown Date: Tue, 10 Sep 2013 16:38:11 +1000 Subject: Cast away char subscripts to avoid warnings from clang. --- lexlib/WordList.cxx | 12 ++++++------ 1 file 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('\r')] = true; + wordSeparator[static_cast('\n')] = true; if (!onlyLineEnds) { - wordSeparator[' '] = true; - wordSeparator['\t'] = true; + wordSeparator[static_cast(' ')] = true; + wordSeparator[static_cast('\t')] = true; } for (int j = 0; wordlist[j]; j++) { int curr = static_cast(wordlist[j]); @@ -163,7 +163,7 @@ bool WordList::InList(const char *s) const { j++; } } - j = starts['^']; + j = starts[static_cast('^')]; 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('^')]; if (j >= 0) { while (words[j][0] == '^') { const char *a = words[j] + 1; -- cgit v1.2.3