aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/CellBuffer.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-03-01 09:55:25 +1100
committerNeil <nyamatongwe@gmail.com>2018-03-01 09:55:25 +1100
commit69f3505ba3066c23024dc6bb6878a339474581bf (patch)
treed1c11379b0b7bac940ba06c749a629703980c292 /src/CellBuffer.cxx
parent3ed7408fb4c322183249afc7f0fce3b9f5de1cf1 (diff)
downloadscintilla-mirror-69f3505ba3066c23024dc6bb6878a339474581bf.tar.gz
Use make_unique in preference to new.
From Effective Modern C++ Item 21.
Diffstat (limited to 'src/CellBuffer.cxx')
-rw-r--r--src/CellBuffer.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx
index 513c9a9b8..b4a4029f6 100644
--- a/src/CellBuffer.cxx
+++ b/src/CellBuffer.cxx
@@ -97,7 +97,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 = std::make_unique<char[]>(lenData_);
memcpy(&data[0], data_, lenData_);
}
lenData = lenData_;