summaryrefslogtreecommitdiffstats
path: root/library/cpp/containers/dense_hash
diff options
context:
space:
mode:
authorrobot-piglet <[email protected]>2025-04-17 14:19:21 +0300
committerrobot-piglet <[email protected]>2025-04-17 14:31:20 +0300
commit2add2ae7f82001fa883ac922a2fb98dc7fb34edb (patch)
tree45137815ef084c6f2839f39e828e91dab8e101bd /library/cpp/containers/dense_hash
parent70b6ecc6f942355f443e6c4637a5659526b3d204 (diff)
Intermediate changes
commit_hash:103a2a417e1039b8e61dc17b40bec9a9b6a7dfd1
Diffstat (limited to 'library/cpp/containers/dense_hash')
-rw-r--r--library/cpp/containers/dense_hash/dense_hash.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/library/cpp/containers/dense_hash/dense_hash.h b/library/cpp/containers/dense_hash/dense_hash.h
index 739479c25a3..b5feb16eefb 100644
--- a/library/cpp/containers/dense_hash/dense_hash.h
+++ b/library/cpp/containers/dense_hash/dense_hash.h
@@ -168,14 +168,10 @@ public:
} else {
initSize = FastClp2(initSize);
}
- BucketMask = initSize - 1;
+ Buckets.clear();
+ BucketMask = 0;
NumFilled = 0;
- TVector<value_type> tmp;
- for (size_type i = 0; i < initSize; ++i) {
- tmp.emplace_back(EmptyMarker, mapped_type{});
- }
- tmp.swap(Buckets);
- GrowThreshold = Max<size_type>(1, initSize * MaxLoadFactor / 100) - 1;
+ Grow(initSize);
}
template <class K>