diff options
author | Neil Hodgson <nyamatongwe@gmail.com> | 2014-01-21 09:45:29 +1100 |
---|---|---|
committer | Neil Hodgson <nyamatongwe@gmail.com> | 2014-01-21 09:45:29 +1100 |
commit | 2bd8a54e0624143ee5128d1e224b1635b2c5d1f4 (patch) | |
tree | 6acd5402304cd8f9efc400d11ca32dab95d5410d /lexlib/WordList.cxx | |
parent | 56d581a730cd2c5dd0959c6b3bd532c9f5ad42e2 (diff) | |
download | scintilla-mirror-2bd8a54e0624143ee5128d1e224b1635b2c5d1f4.tar.gz |
Added ELEMENTS macro and use it to clarify determining size of arrays.
Diffstat (limited to 'lexlib/WordList.cxx')
-rw-r--r-- | lexlib/WordList.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lexlib/WordList.cxx b/lexlib/WordList.cxx index e789c0eaf..10b6fe349 100644 --- a/lexlib/WordList.cxx +++ b/lexlib/WordList.cxx @@ -13,6 +13,7 @@ #include <algorithm> +#include "StringCopy.h" #include "WordList.h" #ifdef SCI_NAMESPACE @@ -131,7 +132,7 @@ void WordList::Set(const char *s) { #else SortWordList(words, len); #endif - for (unsigned int k = 0; k < (sizeof(starts) / sizeof(starts[0])); k++) + for (unsigned int k = 0; k < ELEMENTS(starts); k++) starts[k] = -1; for (int l = len - 1; l >= 0; l--) { unsigned char indexChar = words[l][0]; |