FlatHashTable: bugfix

This commit is contained in:
Arseny Smirnov 2022-02-10 22:44:40 +01:00
parent 500c20f7ea
commit 1a3adc3ee7

View File

@ -55,6 +55,9 @@ class fixed_vector {
const T *end() const {
return ptr_ + size_;
}
bool empty() const {
return size() == 0;
}
size_t size() const {
return size_;
}
@ -431,7 +434,7 @@ class FlatHashMapImpl {
}
void grow() {
size_t want_size = normalize(2 * nodes_.size() - 1);
size_t want_size = normalize(2 * nodes_.size() - !nodes_.empty());
resize(want_size);
}