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/XPM.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/XPM.cxx')
| -rw-r--r-- | src/XPM.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/XPM.cxx b/src/XPM.cxx index 0f314f35f..35bfc79aa 100644 --- a/src/XPM.cxx +++ b/src/XPM.cxx @@ -11,6 +11,8 @@ #include <stdexcept> #include <vector> #include <map> +#include <algorithm> +#include <iterator> #include <memory> #include "Platform.h" @@ -87,7 +89,7 @@ void XPM::Init(const char *const *linesForm) { if (!linesForm) return; - std::fill(colourCodeTable, colourCodeTable+256, 0); + std::fill(colourCodeTable, std::end(colourCodeTable), 0); const char *line0 = linesForm[0]; width = atoi(line0); line0 = NextField(line0); |
