allow creation of multiple shared memory segments

This commit is contained in:
Erwin Coumans
2017-01-06 09:49:03 -08:00
parent 90b1026785
commit 8e554a0c1b
3 changed files with 109 additions and 92 deletions

View File

@@ -476,15 +476,18 @@ protected:
return index;
}
void removeAtIndex(int index)
{
if (index<size())
{
swap( index,size()-1);
pop_back();
}
}
void remove(const T& key)
{
int findIndex = findLinearSearch(key);
if (findIndex<size())
{
swap( findIndex,size()-1);
pop_back();
}
removeAtIndex(findIndex);
}
//PCK: whole function