mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-03 22:28:46 +00:00
add rehash to map_shrink_dynamic
This commit is contained in:
@@ -610,6 +610,7 @@ map_shrink_dynamic :: proc "odin" (#no_alias m: ^Raw_Map, #no_alias info: ^Map_I
|
|||||||
|
|
||||||
k := map_cell_index_dynamic(ks, info.ks, i)
|
k := map_cell_index_dynamic(ks, info.ks, i)
|
||||||
v := map_cell_index_dynamic(vs, info.vs, i)
|
v := map_cell_index_dynamic(vs, info.vs, i)
|
||||||
|
hash = info.key_hasher(rawptr(k), map_seed(shrunk))
|
||||||
_ = map_insert_hash_dynamic(&shrunk, info, hash, k, v)
|
_ = map_insert_hash_dynamic(&shrunk, info, hash, k, v)
|
||||||
// Only need to do this comparison on each actually added pair, so do not
|
// Only need to do this comparison on each actually added pair, so do not
|
||||||
// fold it into the for loop comparator as a micro-optimization.
|
// fold it into the for loop comparator as a micro-optimization.
|
||||||
|
|||||||
Reference in New Issue
Block a user