Support for swapping in a UniquePtrList.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-08-10 17:20:37 +02:00
parent 08952c86d0
commit 6e7a28d754
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 5 additions and 0 deletions

View File

@ -46,6 +46,11 @@ namespace ArbUt {
_vector[index] = nullptr;
return p;
}
void Swap(size_t indexA, size_t indexB){
auto temp = _vector[indexA];
_vector[indexA] = _vector[indexB];
_vector[indexB] = temp;
}
void Set(size_t index, ValueT* ptr) {
delete _vector[index];
_vector[index] = ptr;