BOpenHashTable::Clear(): Set fItemCount to 0
If not empty, the count would afterwards be out of sync with reality.
This commit is contained in:
parent
6a2d6f5062
commit
274ca38fd1
@ -230,7 +230,7 @@ public:
|
||||
*/
|
||||
ValueType* Clear(bool returnElements = false)
|
||||
{
|
||||
if (this->fItemCount == 0)
|
||||
if (fItemCount == 0)
|
||||
return NULL;
|
||||
|
||||
ValueType* result = NULL;
|
||||
@ -256,6 +256,7 @@ public:
|
||||
}
|
||||
|
||||
memset(this->fTable, 0, sizeof(ValueType*) * this->fTableSize);
|
||||
fItemCount = 0;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user