diff options
author | Neil <nyamatongwe@gmail.com> | 2018-04-28 10:31:25 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-04-28 10:31:25 +1000 |
commit | 06220b1501744c5cebc861e6e6e06449814b1d60 (patch) | |
tree | 2580e78f4473f8f3b756462484fc5506a581dd15 /src/SparseVector.h | |
parent | 774bb684b2afbf1637f7fa29e13fd901d15681d6 (diff) | |
download | scintilla-mirror-06220b1501744c5cebc861e6e6e06449814b1d60.tar.gz |
Backport: Delete standard functions on classes where there could be attempts to copy.
Backport of changeset 6756:29866b0927e0.
Diffstat (limited to 'src/SparseVector.h')
-rw-r--r-- | src/SparseVector.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/SparseVector.h b/src/SparseVector.h index df42e4511..3b1b7d299 100644 --- a/src/SparseVector.h +++ b/src/SparseVector.h @@ -18,9 +18,6 @@ private: std::unique_ptr<Partitioning<Sci::Position>> starts; std::unique_ptr<SplitVector<T>> values; T empty; - // Deleted so SparseVector objects can not be copied. - SparseVector(const SparseVector &) = delete; - void operator=(const SparseVector &) = delete; void ClearValue(Sci::Position partition) { values->SetValueAt(partition, T()); } @@ -30,6 +27,11 @@ public: values = std::unique_ptr<SplitVector<T>>(new SplitVector<T>()); values->InsertEmpty(0, 2); } + // Deleted so SparseVector objects can not be copied. + SparseVector(const SparseVector &) = delete; + SparseVector(SparseVector &&) = delete; + void operator=(const SparseVector &) = delete; + void operator=(SparseVector &&) = delete; ~SparseVector() { starts.reset(); // starts dead here but not used by ClearValue. |