aboutsummaryrefslogtreecommitdiff
path: root/src/scintilla_backports/6436_a366ce1a811e.patch
diff options
context:
space:
mode:
Diffstat (limited to 'src/scintilla_backports/6436_a366ce1a811e.patch')
-rw-r--r--src/scintilla_backports/6436_a366ce1a811e.patch110
1 files changed, 110 insertions, 0 deletions
diff --git a/src/scintilla_backports/6436_a366ce1a811e.patch b/src/scintilla_backports/6436_a366ce1a811e.patch
new file mode 100644
index 00000000..f2a22132
--- /dev/null
+++ b/src/scintilla_backports/6436_a366ce1a811e.patch
@@ -0,0 +1,110 @@
+# HG changeset patch
+# User Neil <nyamatongwe@gmail.com>
+# Date 1517091000 -39600
+# Node ID a366ce1a811e322b24f08a20825947113d39d698
+# Parent 5dd1b26df75f0ffa20624a61d1b77d24406ba048
+Use std::end when filling arrays as reduces chance of mistake.
+
+diff -r 5dd1b26df75f -r a366ce1a811e lexlib/WordList.cxx
+--- a/lexlib/WordList.cxx Sun Jan 28 08:57:56 2018 +1100
++++ b/lexlib/WordList.cxx Sun Jan 28 09:10:00 2018 +1100
+@@ -10,6 +10,7 @@
+ #include <cstring>
+
+ #include <algorithm>
++#include <iterator>
+
+ #include "StringCopy.h"
+ #include "WordList.h"
+@@ -128,7 +129,7 @@
+ #else
+ SortWordList(words, len);
+ #endif
+- std::fill(starts, starts + ELEMENTS(starts), -1);
++ std::fill(starts, std::end(starts), -1);
+ for (int l = len - 1; l >= 0; l--) {
+ unsigned char indexChar = words[l][0];
+ starts[indexChar] = l;
+diff -r 5dd1b26df75f -r a366ce1a811e scripts/HeaderOrder.txt
+--- a/scripts/HeaderOrder.txt Sun Jan 28 08:57:56 2018 +1100
++++ b/scripts/HeaderOrder.txt Sun Jan 28 09:10:00 2018 +1100
+@@ -39,6 +39,7 @@
+ #include <set>
+ #include <forward_list>
+ #include <algorithm>
++#include <iterator>
+ #include <functional>
+ #include <memory>
+ #include <regex>
+diff -r 5dd1b26df75f -r a366ce1a811e src/PositionCache.cxx
+--- a/src/PositionCache.cxx Sun Jan 28 08:57:56 2018 +1100
++++ b/src/PositionCache.cxx Sun Jan 28 09:10:00 2018 +1100
+@@ -14,5 +14,6 @@
+ #include <vector>
+ #include <map>
+ #include <algorithm>
++#include <iterator>
+
+ #include "Platform.h"
+@@ -378,7 +379,7 @@
+ }
+
+ 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 @@
+
+ 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) {
+diff -r 5dd1b26df75f -r a366ce1a811e src/RESearch.cxx
+--- a/src/RESearch.cxx Sun Jan 28 08:57:56 2018 +1100
++++ b/src/RESearch.cxx Sun Jan 28 09:10:00 2018 +1100
+@@ -205,6 +205,7 @@
+ #include <stdexcept>
+ #include <string>
+ #include <algorithm>
++#include <iterator>
+
+ #include "Position.h"
+ #include "CharClassify.h"
+@@ -254,9 +255,9 @@
+ 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();
+ }
+
+diff -r 5dd1b26df75f -r a366ce1a811e src/XPM.cxx
+--- a/src/XPM.cxx Sun Jan 28 08:57:56 2018 +1100
++++ b/src/XPM.cxx Sun Jan 28 09:10:00 2018 +1100
+@@ -11,5 +11,7 @@
+ #include <stdexcept>
+ #include <vector>
+ #include <map>
++#include <algorithm>
++#include <iterator>
+
+ #include "Platform.h"
+@@ -87,7 +89,7 @@
+ 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);