mirror of
https://github.com/greg7mdp/parallel-hashmap.git
synced 2026-08-29 16:40:39 +08:00
operator=() should preserve load_factor - issue #136
This commit is contained in:
Vendored
+1
-1
@@ -1154,7 +1154,7 @@ public:
|
|||||||
|
|
||||||
raw_hash_set(const raw_hash_set& that, const allocator_type& a)
|
raw_hash_set(const raw_hash_set& that, const allocator_type& a)
|
||||||
: raw_hash_set(0, that.hash_ref(), that.eq_ref(), a) {
|
: raw_hash_set(0, that.hash_ref(), that.eq_ref(), a) {
|
||||||
reserve(that.size());
|
reserve(that.capacity());
|
||||||
// Because the table is guaranteed to be empty, we can do something faster
|
// Because the table is guaranteed to be empty, we can do something faster
|
||||||
// than a full `insert`.
|
// than a full `insert`.
|
||||||
for (const auto& v : that) {
|
for (const auto& v : that) {
|
||||||
|
|||||||
Reference in New Issue
Block a user