From ea08c765fc5ed02f4a78fda3a15f28b70c99b203 Mon Sep 17 00:00:00 2001 From: greg7mdp Date: Sat, 5 Oct 2024 17:47:38 -0400 Subject: [PATCH] Support loading old `phmap_dump` files. --- include/gtl/phmap_dump.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/gtl/phmap_dump.hpp b/include/gtl/phmap_dump.hpp index a820e49..2018bf2 100644 --- a/include/gtl/phmap_dump.hpp +++ b/include/gtl/phmap_dump.hpp @@ -97,6 +97,8 @@ bool raw_hash_set::phmap_load(InputArchive& ar) { if (version > 0) { // growth_left should be restored after calling initialize_slots() which resets it. ar.loadBinary(&growth_left(), sizeof(size_t)); + } else { + drop_deletes_without_resize(); } ar.loadBinary(ctrl_, sizeof(ctrl_t) * (capacity_ + Group::kWidth + 1)); ar.loadBinary(slots_, sizeof(slot_type) * capacity_);