diff options
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 730dd2e7e..fa26b29bb 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -19,6 +19,7 @@ #include <map> #include <forward_list> #include <algorithm> +#include <iterator> #include <memory> #include "Platform.h" @@ -28,6 +29,7 @@ #include "Scintilla.h" #include "StringCopy.h" +#include "CharacterSet.h" #include "Position.h" #include "UniqueString.h" #include "SplitVector.h" @@ -204,7 +206,7 @@ void Editor::SetRepresentations() { reprs.Clear(); // C0 control set - const char *reps[] = { + const char * const reps[] = { "NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL", "BS", "HT", "LF", "VT", "FF", "CR", "SO", "SI", "DLE", "DC1", "DC2", "DC3", "DC4", "NAK", "SYN", "ETB", @@ -218,7 +220,7 @@ void Editor::SetRepresentations() { // C1 control set // As well as Unicode mode, ISO-8859-1 should use these if (IsUnicodeMode()) { - const char *repsC1[] = { + const char * const repsC1[] = { "PAD", "HOP", "BPH", "NBH", "IND", "NEL", "SSA", "ESA", "HTS", "HTJ", "VTS", "PLD", "PLU", "RI", "SS2", "SS3", "DCS", "PU1", "PU2", "STS", "CCH", "MW", "SPA", "EPA", @@ -1632,7 +1634,7 @@ void Editor::LinesSplit(int pixelWidth) { } } -void Editor::PaintSelMargin(Surface *surfaceWindow, PRectangle &rc) { +void Editor::PaintSelMargin(Surface *surfaceWindow, const PRectangle &rc) { if (vs.fixedColumnWidth == 0) return; @@ -2612,7 +2614,7 @@ void Editor::NotifyModified(Document *, DocModification mh, void *) { if (mh.modificationType & SC_MOD_CHANGEANNOTATION) { const Sci::Line lineDoc = pdoc->SciLineFromPosition(mh.position); if (vs.annotationVisible) { - if (pcs->SetHeight(lineDoc, static_cast<int>(pcs->GetHeight(lineDoc) + mh.annotationLinesAdded))) { + if (pcs->SetHeight(lineDoc, pcs->GetHeight(lineDoc) + static_cast<int>(mh.annotationLinesAdded))) { SetScrollBars(); } Redraw(); @@ -4092,12 +4094,10 @@ std::string Editor::CaseMapString(const std::string &s, int caseMapping) { for (char &ch : ret) { switch (caseMapping) { case cmUpper: - if (ch >= 'a' && ch <= 'z') - ch = static_cast<char>(ch - 'a' + 'A'); + ch = MakeUpperCase(ch); break; case cmLower: - if (ch >= 'A' && ch <= 'Z') - ch = static_cast<char>(ch - 'A' + 'a'); + ch = MakeLowerCase(ch); break; } } |