diff options
author | mitchell <unknown> | 2020-01-05 21:22:02 -0500 |
---|---|---|
committer | mitchell <unknown> | 2020-01-05 21:22:02 -0500 |
commit | 60e87889d6438e386acf58c3967fb874af9aae82 (patch) | |
tree | 9c5c2660c59aff04ddedea19fa03fd271f8bba5c /src/Editor.cxx | |
parent | dbb7374c185718655dd77c294eb281e8b93c538e (diff) | |
download | scintilla-mirror-60e87889d6438e386acf58c3967fb874af9aae82.tar.gz |
Added Sci::make_unique() and Sci::size() for better compatibility with the default branch.
std::make_unique() is c++14 and std::size() is c++17.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index f8dd2ccad..aec983f00 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -28,7 +28,6 @@ #include "ILexer.h" #include "Scintilla.h" -#include "StringCopy.h" #include "CharacterSet.h" #include "CharacterCategory.h" #include "Position.h" @@ -218,7 +217,7 @@ void Editor::SetRepresentations() { "DLE", "DC1", "DC2", "DC3", "DC4", "NAK", "SYN", "ETB", "CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US" }; - for (size_t j=0; j < ELEMENTS(reps); j++) { + for (size_t j=0; j < Sci::size(reps); j++) { const char c[2] = { static_cast<char>(j), 0 }; reprs.SetRepresentation(c, reps[j]); } @@ -232,7 +231,7 @@ void Editor::SetRepresentations() { "DCS", "PU1", "PU2", "STS", "CCH", "MW", "SPA", "EPA", "SOS", "SGCI", "SCI", "CSI", "ST", "OSC", "PM", "APC" }; - for (size_t j=0; j < ELEMENTS(repsC1); j++) { + for (size_t j=0; j < Sci::size(repsC1); j++) { const char c1[3] = { '\xc2', static_cast<char>(0x80+j), 0 }; reprs.SetRepresentation(c1, repsC1[j]); } @@ -1989,7 +1988,7 @@ void Editor::InsertCharacter(const char *s, unsigned int len, CharacterSource ch // characters representing themselves. } else { unsigned int utf32[1] = { 0 }; - UTF32FromUTF8(s, len, utf32, ELEMENTS(utf32)); + UTF32FromUTF8(s, len, utf32, Sci::size(utf32)); ch = utf32[0]; } } |