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 | 9472b43539e7b4a6a3f5e657b0ec06e9e6e5eab9 (patch) | |
| tree | 2486c7953942f70d46f805c5a809165c98424500 /src/SparseVector.h | |
| parent | 3173850f9261c9af83c91e92450879b233565670 (diff) | |
| download | scintilla-mirror-9472b43539e7b4a6a3f5e657b0ec06e9e6e5eab9.tar.gz | |
Delete standard functions on classes where there could be attempts to copy.
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 0667e54c4..2d3e9cfae 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::make_unique<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. | 
