From 56ac67e29e56182e950929331c627310787b8931 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 28 Jan 2018 09:10:00 +1100 Subject: Backport: Use std::end when filling arrays as reduces chance of mistake. Backport of changeset 6436:a366ce1a811e. --- src/XPM.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/XPM.cxx') 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 #include #include +#include +#include #include #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); -- cgit v1.2.3