mirror of
https://github.com/greg7mdp/parallel-hashmap.git
synced 2026-08-29 08:34:39 +08:00
Do nothing when calling clear() on empty hash_map. Cereal does call map.clear() when deserializing. Issue #19.
This commit is contained in:
Vendored
+2
@@ -1202,6 +1202,8 @@ public:
|
||||
// compared to destruction of the elements of the container. So we pick the
|
||||
// largest bucket_count() threshold for which iteration is still fast and
|
||||
// past that we simply deallocate the array.
|
||||
if (empty())
|
||||
return;
|
||||
if (capacity_ > 127) {
|
||||
destroy_slots();
|
||||
} else if (capacity_) {
|
||||
|
||||
Reference in New Issue
Block a user