diff options
author | Neil <nyamatongwe@gmail.com> | 2018-03-01 09:55:25 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-03-01 09:55:25 +1100 |
commit | 69f3505ba3066c23024dc6bb6878a339474581bf (patch) | |
tree | d1c11379b0b7bac940ba06c749a629703980c292 /src/Partitioning.h | |
parent | 3ed7408fb4c322183249afc7f0fce3b9f5de1cf1 (diff) | |
download | scintilla-mirror-69f3505ba3066c23024dc6bb6878a339474581bf.tar.gz |
Use make_unique in preference to new.
From Effective Modern C++ Item 21.
Diffstat (limited to 'src/Partitioning.h')
-rw-r--r-- | src/Partitioning.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Partitioning.h b/src/Partitioning.h index 112a543ca..57c8656c8 100644 --- a/src/Partitioning.h +++ b/src/Partitioning.h @@ -83,7 +83,7 @@ private: } void Allocate(ptrdiff_t growSize) { - body.reset(new SplitVectorWithRangeAdd<T>(growSize)); + body = std::make_unique<SplitVectorWithRangeAdd<T>>(growSize); stepPartition = 0; stepLength = 0; body->Insert(0, 0); // This value stays 0 for ever |