BOpenHashTable::Clear(): Set fItemCount to 0

If not empty, the count would afterwards be out of sync with reality.
This commit is contained in:
Ingo Weinhold
2013-04-27 16:21:41 -04:00
committed by Rene Gollent
parent 6a2d6f5062
commit 274ca38fd1
+2 -1
View File
@@ -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;
}