Permalink
Browse files

Hashmaps: Reset count on clear.

  • Loading branch information...
unknownbrackets committed Dec 2, 2017
1 parent 681ce95 commit 668b17febfcf485e0e03c1a7f2e67e30b7b624d4
Showing with 2 additions and 0 deletions.
  1. +2 −0 Common/Hashmaps.h
View
@@ -131,6 +131,7 @@ class DenseHashMap {
void Clear() {
memset(state.data(), (int)BucketState::FREE, state.size());
count_ = 0;
}
void Rebuild() {
@@ -275,6 +276,7 @@ class PrehashMap {
void Clear() {
memset(state.data(), (int)BucketState::FREE, state.size());
count_ = 0;
}
// Gets rid of REMOVED tombstones, making lookups somewhat more efficient.

0 comments on commit 668b17f

Please sign in to comment.