Further fixes for Remove function on UniquePtrList
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
44fc403fb6
commit
4323e59ed4
|
@ -42,7 +42,7 @@ namespace ArbUt {
|
|||
return _vector[index];
|
||||
}
|
||||
|
||||
inline void Remove(size_t index){
|
||||
inline void Remove(size_t index) {
|
||||
#ifndef NO_ASSERT
|
||||
if (index >= _vector.size()) {
|
||||
std::stringstream ss;
|
||||
|
@ -50,9 +50,8 @@ namespace ArbUt {
|
|||
throw std::logic_error(ss.str());
|
||||
}
|
||||
#endif
|
||||
auto item = _vector[index];
|
||||
delete item;
|
||||
_vector.erase(item);
|
||||
delete _vector[index];
|
||||
_vector.erase(_vector.begin() + index);
|
||||
}
|
||||
|
||||
inline bool Contains(const BorrowedPtr<ValueT>& value) const {
|
||||
|
|
Loading…
Reference in New Issue