From 69f3505ba3066c23024dc6bb6878a339474581bf Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 1 Mar 2018 09:55:25 +1100 Subject: Use make_unique in preference to new. From Effective Modern C++ Item 21. --- src/ContractionState.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/ContractionState.cxx') diff --git a/src/ContractionState.cxx b/src/ContractionState.cxx index 8777e4af9..77b717a17 100644 --- a/src/ContractionState.cxx +++ b/src/ContractionState.cxx @@ -35,11 +35,11 @@ ContractionState::~ContractionState() { void ContractionState::EnsureData() { if (OneToOne()) { - visible.reset(new RunStyles()); - expanded.reset(new RunStyles()); - heights.reset(new RunStyles()); - foldDisplayTexts.reset(new SparseVector()); - displayLines.reset(new Partitioning(4)); + visible = std::make_unique>(); + expanded = std::make_unique>(); + heights = std::make_unique>(); + foldDisplayTexts = std::make_unique>(); + displayLines = std::make_unique>(4); InsertLines(0, linesInDocument); } } -- cgit v1.2.3