Tessil / ordered-map

C++ hash map and hash set which preserve the order of insertion
MIT License
512 stars 66 forks source link

Fix shift_indexes_in_buckets by going through the whole m_buckets_data instead of finding back the bucket through m_values #39

Closed Tessil closed 1 year ago

Tessil commented 1 year ago

Fix shift_indexes_in_buckets by going through the whole m_buckets_data instead of finding back the bucket through m_values

shift_indexes_in_buckets was trying to find back a bucket through m_values but as it modifies the indexes during the iteration, there's a risk of having two buckets with the same index for which we can't reliably know which one still need a shift by delta.

Fix issue #38