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 /src/RESearch.cxx | |
| 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 'src/RESearch.cxx')
| -rw-r--r-- | src/RESearch.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/RESearch.cxx b/src/RESearch.cxx index 31ee9aaac..f7ae04974 100644 --- a/src/RESearch.cxx +++ b/src/RESearch.cxx @@ -205,6 +205,7 @@ #include <stdexcept> #include <string> #include <algorithm> +#include <iterator> #include "Position.h" #include "CharClassify.h" @@ -254,9 +255,9 @@ RESearch::RESearch(CharClassify *charClassTable) { charClass = charClassTable; sta = NOP; /* status of lastpat */ bol = 0; - std::fill(bittab, bittab + BITBLK, static_cast<unsigned char>(0)); - std::fill(tagstk, tagstk + MAXTAG, 0); - std::fill(nfa, nfa + MAXNFA, '\0'); + std::fill(bittab, std::end(bittab), static_cast<unsigned char>(0)); + std::fill(tagstk, std::end(tagstk), 0); + std::fill(nfa, std::end(nfa), '\0'); Clear(); } |
