diff options
| author | Neil <nyamatongwe@gmail.com> | 2017-05-21 10:26:10 +1000 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2017-05-21 10:26:10 +1000 | 
| commit | 8ef4f3d54de1328a1d9753f4317a5d7692a72ae8 (patch) | |
| tree | d0fb1e0c6cbd0a0256066ccb9e1541d3adbdf41c /src/SparseVector.h | |
| parent | 632801dae9d844bd73891a314e99161add3f47fc (diff) | |
| download | scintilla-mirror-8ef4f3d54de1328a1d9753f4317a5d7692a72ae8.tar.gz | |
Make SplitVector work with move-only types like unique_ptr.
Provide InsertEmpty and both const and non-const reference returning operator[].
Add and fix comments.
Diffstat (limited to 'src/SparseVector.h')
| -rw-r--r-- | src/SparseVector.h | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/src/SparseVector.h b/src/SparseVector.h index 39324bdc1..ce38d0da1 100644 --- a/src/SparseVector.h +++ b/src/SparseVector.h @@ -163,7 +163,8 @@ template<>  inline void SparseVector<const char *>::ClearValue(int partition) {  	const char *value = values->ValueAt(partition);  	delete []value; -	values->SetValueAt(partition, NULL); +	value = nullptr; +	values->SetValueAt(partition, value);  }  template<> @@ -175,7 +176,7 @@ inline void SparseVector<const char *>::SetValueAt(int position, const char *val  		std::copy(value, value + len, valueCopy);  		CommonSetValueAt(position, valueCopy);  	} else { -		CommonSetValueAt(position, NULL); +		CommonSetValueAt(position, nullptr);  	}  }  | 
