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/CellBuffer.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/CellBuffer.cxx')
| -rw-r--r-- | src/CellBuffer.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
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<char []>(new char[lenData_]); + data = Sci::make_unique<char[]>(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<LineVector<Sci::Position>>(new LineVector<Sci::Position>()); + plv = Sci::make_unique<LineVector<Sci::Position>>(); else - plv = std::unique_ptr<LineVector<int>>(new LineVector<int>()); + plv = Sci::make_unique<LineVector<int>>(); } CellBuffer::~CellBuffer() { |
