From 60e87889d6438e386acf58c3967fb874af9aae82 Mon Sep 17 00:00:00 2001 From: mitchell Date: Sun, 5 Jan 2020 21:22:02 -0500 Subject: 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. --- src/EditView.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/EditView.cxx') diff --git a/src/EditView.cxx b/src/EditView.cxx index c16f25ac6..3ae7a5d67 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -28,7 +28,6 @@ #include "ILexer.h" #include "Scintilla.h" -#include "StringCopy.h" #include "CharacterSet.h" #include "CharacterCategory.h" #include "Position.h" @@ -229,7 +228,7 @@ bool EditView::ClearTabstops(Sci::Line line) { bool EditView::AddTabstop(Sci::Line line, int x) { if (!ldTabstops) { - ldTabstops.reset(new LineTabstops()); + ldTabstops = Sci::make_unique(); } return ldTabstops && ldTabstops->AddTabstop(line, x); } @@ -287,7 +286,7 @@ static const char *ControlCharacterString(unsigned char ch) noexcept { "DLE", "DC1", "DC2", "DC3", "DC4", "NAK", "SYN", "ETB", "CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US" }; - if (ch < ELEMENTS(reps)) { + if (ch < Sci::size(reps)) { return reps[ch]; } else { return "BAD"; -- cgit v1.2.3