diff options
author | Neil <nyamatongwe@gmail.com> | 2018-01-28 09:10:00 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-01-28 09:10:00 +1100 |
commit | 1bd42ee98eff237cbc8e3856aa1e63ef5bc5b64a (patch) | |
tree | f056a21042b9c35d350b8356742baea9b4d333a8 /lexlib | |
parent | 6141b5164e83cf1122027decd88829e735ba707d (diff) | |
download | scintilla-mirror-1bd42ee98eff237cbc8e3856aa1e63ef5bc5b64a.tar.gz |
Use std::end when filling arrays as reduces chance of mistake.
Diffstat (limited to 'lexlib')
-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 f65b5ed48..425bcc01a 100644 --- a/lexlib/WordList.cxx +++ b/lexlib/WordList.cxx @@ -10,6 +10,7 @@ #include <cstring> #include <algorithm> +#include <iterator> #include "StringCopy.h" #include "WordList.h" @@ -128,7 +129,7 @@ void WordList::Set(const char *s) { #else SortWordList(words, len); #endif - std::fill(starts, starts + ELEMENTS(starts), -1); + std::fill(starts, std::end(starts), -1); for (int l = len - 1; l >= 0; l--) { unsigned char indexChar = words[l][0]; starts[indexChar] = l; |