aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexlib/WordList.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2017-04-06 21:04:37 +1000
committerNeil <nyamatongwe@gmail.com>2017-04-06 21:04:37 +1000
commitcda15af9657880e91ccf65603e109b202d9e78bf (patch)
treeeb730cdcc810842ce2255c3d2af9872041583a74 /lexlib/WordList.cxx
parentdba2fe55b8a4ab4ac34795fe4a4b30a729c77016 (diff)
downloadscintilla-mirror-cda15af9657880e91ccf65603e109b202d9e78bf.tar.gz
Added const where possible.
Diffstat (limited to 'lexlib/WordList.cxx')
-rw-r--r--lexlib/WordList.cxx8
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) {