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/CellBuffer.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/CellBuffer.cxx') diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index 3257e0e6b..0bfe74b52 100644 --- a/src/CellBuffer.cxx +++ b/src/CellBuffer.cxx @@ -282,7 +282,7 @@ void Action::Create(actionType at_, Sci::Position position_, const char *data_, position = position_; at = at_; if (lenData_) { - data = std::unique_ptr(new char[lenData_]); + data = Sci::make_unique(lenData_); memcpy(&data[0], data_, lenData_); } lenData = lenData_; @@ -534,9 +534,9 @@ CellBuffer::CellBuffer(bool hasStyles_, bool largeDocument_) : utf8LineEnds = 0; collectingUndo = true; if (largeDocument) - plv = std::unique_ptr>(new LineVector()); + plv = Sci::make_unique>(); else - plv = std::unique_ptr>(new LineVector()); + plv = Sci::make_unique>(); } CellBuffer::~CellBuffer() { -- cgit v1.2.3