diff options
Diffstat (limited to 'AK/HashTable.h')
-rw-r--r-- | AK/HashTable.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/AK/HashTable.h b/AK/HashTable.h index 9ac8c9d507..a3a59560b5 100644 --- a/AK/HashTable.h +++ b/AK/HashTable.h @@ -690,6 +690,10 @@ private: auto* shift_to_bucket = &m_buckets[shift_to_index]; *shift_to_bucket = move(*shift_from_bucket); + if constexpr (IsOrdered) { + shift_from_bucket->previous = nullptr; + shift_from_bucket->next = nullptr; + } shift_to_bucket->state = bucket_state_for_probe_length(shift_from_probe_length - 1); update_bucket_neighbours(shift_to_bucket); |