diff options
Diffstat (limited to 'lexlib/WordList.cxx')
-rw-r--r-- | lexlib/WordList.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lexlib/WordList.cxx b/lexlib/WordList.cxx index 2f673397f..895fdf7dc 100644 --- a/lexlib/WordList.cxx +++ b/lexlib/WordList.cxx @@ -34,7 +34,7 @@ static char **ArrayFromWordList(char *wordlist, int *len, bool onlyLineEnds = fa wordSeparator[static_cast<unsigned int>('\t')] = true; } for (int j = 0; wordlist[j]; j++) { - int curr = static_cast<unsigned char>(wordlist[j]); + const int curr = static_cast<unsigned char>(wordlist[j]); if (!wordSeparator[curr] && wordSeparator[prev]) words++; prev = curr; @@ -143,7 +143,7 @@ void WordList::Set(const char *s) { bool WordList::InList(const char *s) const { if (0 == words) return false; - unsigned char firstChar = s[0]; + const unsigned char firstChar = s[0]; int j = starts[firstChar]; if (j >= 0) { while (static_cast<unsigned char>(words[j][0]) == firstChar) { @@ -185,7 +185,7 @@ bool WordList::InList(const char *s) const { bool WordList::InListAbbreviated(const char *s, const char marker) const { if (0 == words) return false; - unsigned char firstChar = s[0]; + const unsigned char firstChar = s[0]; int j = starts[firstChar]; if (j >= 0) { while (static_cast<unsigned char>(words[j][0]) == firstChar) { @@ -239,7 +239,7 @@ bool WordList::InListAbbreviated(const char *s, const char marker) const { bool WordList::InListAbridged(const char *s, const char marker) const { if (0 == words) return false; - unsigned char firstChar = s[0]; + const unsigned char firstChar = s[0]; int j = starts[firstChar]; if (j >= 0) { while (static_cast<unsigned char>(words[j][0]) == firstChar) { |