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 /src/XPM.cxx | |
parent | 6141b5164e83cf1122027decd88829e735ba707d (diff) | |
download | scintilla-mirror-1bd42ee98eff237cbc8e3856aa1e63ef5bc5b64a.tar.gz |
Use std::end when filling arrays as reduces chance of mistake.
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); |