aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Document.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/Document.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/Document.cxx')
-rw-r--r--src/Document.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Document.cxx b/src/Document.cxx
index a6f408f3e..41d6b2375 100644
--- a/src/Document.cxx
+++ b/src/Document.cxx
@@ -118,11 +118,11 @@ Document::Document(int options) :
UTF8BytesOfLeadInitialise();
- perLineData[ldMarkers].reset(new LineMarkers());
- perLineData[ldLevels].reset(new LineLevels());
- perLineData[ldState].reset(new LineState());
- perLineData[ldMargin].reset(new LineAnnotation());
- perLineData[ldAnnotation].reset(new LineAnnotation());
+ perLineData[ldMarkers] = std::make_unique<LineMarkers>();
+ perLineData[ldLevels] = std::make_unique<LineLevels>();
+ perLineData[ldState] = std::make_unique<LineState>();
+ perLineData[ldMargin] = std::make_unique<LineAnnotation>();
+ perLineData[ldAnnotation] = std::make_unique<LineAnnotation>();
cb.SetPerLine(this);
}