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 | 56ac67e29e56182e950929331c627310787b8931 (patch) | |
| tree | 895ca2d839bf403977423fd07df195e5d0463cc0 /lexlib | |
| parent | 0adf380a4baa2e879279e35b9a5b48fb7d860444 (diff) | |
| download | scintilla-mirror-56ac67e29e56182e950929331c627310787b8931.tar.gz | |
Backport: Use std::end when filling arrays as reduces chance of mistake.
Backport of changeset 6436:a366ce1a811e.
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; |
