Change internal layout of map[K]V

This commit is contained in:
gingerBill
2020-11-23 18:25:01 +00:00
parent 4762d2f2d1
commit 91758656f6
6 changed files with 109 additions and 121 deletions
+2 -1
View File
@@ -264,7 +264,8 @@ reserve_map :: proc(m: ^$T/map[$K]$V, capacity: int) {
@builtin
delete_key :: proc(m: ^$T/map[$K]$V, key: K) {
if m != nil {
__dynamic_map_delete_key(__get_map_header(m), __get_map_key(key));
key := key;
__dynamic_map_delete_key(__get_map_header(m), __get_map_key(&key));
}
}