Support for swapping in a UniquePtrList.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
08952c86d0
commit
6e7a28d754
|
@ -46,6 +46,11 @@ namespace ArbUt {
|
||||||
_vector[index] = nullptr;
|
_vector[index] = nullptr;
|
||||||
return p;
|
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) {
|
void Set(size_t index, ValueT* ptr) {
|
||||||
delete _vector[index];
|
delete _vector[index];
|
||||||
_vector[index] = ptr;
|
_vector[index] = ptr;
|
||||||
|
|
Loading…
Reference in New Issue