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/RunStyles.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/RunStyles.cxx')
| -rw-r--r-- | src/RunStyles.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/RunStyles.cxx b/src/RunStyles.cxx index 115f51a9a..da000e69d 100644 --- a/src/RunStyles.cxx +++ b/src/RunStyles.cxx @@ -78,8 +78,8 @@ void RunStyles<DISTANCE, STYLE>::RemoveRunIfSameAsPrevious(DISTANCE run) { template <typename DISTANCE, typename STYLE> RunStyles<DISTANCE, STYLE>::RunStyles() { - starts.reset(new Partitioning<DISTANCE>(8)); - styles.reset(new SplitVector<STYLE>()); + starts = Sci::make_unique<Partitioning<DISTANCE>>(8); + styles = Sci::make_unique<SplitVector<STYLE>>(); styles->InsertValue(0, 2, 0); } @@ -215,8 +215,8 @@ void RunStyles<DISTANCE, STYLE>::InsertSpace(DISTANCE position, DISTANCE insertL template <typename DISTANCE, typename STYLE> void RunStyles<DISTANCE, STYLE>::DeleteAll() { - starts.reset(new Partitioning<DISTANCE>(8)); - styles.reset(new SplitVector<STYLE>()); + starts = Sci::make_unique<Partitioning<DISTANCE>>(8); + styles = Sci::make_unique<SplitVector<STYLE>>(); styles->InsertValue(0, 2, 0); } |
