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/PositionCache.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/PositionCache.cxx')
-rw-r--r-- | src/PositionCache.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index 0b563f525..99e3c4d56 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -14,6 +14,7 @@ #include <vector> #include <map> #include <algorithm> +#include <iterator> #include <memory> #include "Platform.h" @@ -378,7 +379,7 @@ static inline int KeyFromString(const char *charBytes, size_t len) { } SpecialRepresentations::SpecialRepresentations() { - std::fill(startByteHasReprs, startByteHasReprs+0x100, static_cast<short>(0)); + std::fill(startByteHasReprs, std::end(startByteHasReprs), static_cast<short>(0)); } void SpecialRepresentations::SetRepresentation(const char *charBytes, const char *value) { @@ -419,7 +420,7 @@ bool SpecialRepresentations::Contains(const char *charBytes, size_t len) const { void SpecialRepresentations::Clear() { mapReprs.clear(); - std::fill(startByteHasReprs, startByteHasReprs+0x100, static_cast<short>(0)); + std::fill(startByteHasReprs, std::end(startByteHasReprs), static_cast<short>(0)); } void BreakFinder::Insert(int val) { |