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 | c63c9dc7ca058d1b352c14f8052769d541c7e955 (patch) | |
tree | 726bbd8e98196bc0b224448af3ed6227fae96d3e /lexlib/WordList.cxx | |
parent | 023603c25dfdc73b0a51baaf3309d1bf18e04261 (diff) | |
download | scintilla-mirror-c63c9dc7ca058d1b352c14f8052769d541c7e955.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]; |