diff options
| author | gingerBill <bill@gingerbill.org> | 2022-11-14 11:46:41 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-11-14 11:47:56 +0000 |
| commit | bbe44b49bcd66b7bfc74795a69142f8b94919107 (patch) | |
| tree | 7b6dd39b6579eecdb0c9def818970838834e3007 /core/runtime | |
| parent | 25bec19b1f91cac47544ec434b825bd2b9727a39 (diff) | |
Correct `map_insert`
Diffstat (limited to 'core/runtime')
| -rw-r--r-- | core/runtime/core_builtin.odin | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/core/runtime/core_builtin.odin b/core/runtime/core_builtin.odin index 24a53dfbd..6792734d2 100644 --- a/core/runtime/core_builtin.odin +++ b/core/runtime/core_builtin.odin @@ -629,10 +629,7 @@ shrink_dynamic_array :: proc(array: ^$T/[dynamic]$E, new_cap := -1, loc := #call @builtin map_insert :: proc(m: ^$T/map[$K]$V, key: K, value: V, loc := #caller_location) -> (ptr: ^V) { key, value := key, value - h := __get_map_header_table(T) - - e := __dynamic_map_set(m, h, __get_map_key_hash(&key), &key, &value, loc) - return (^V)(uintptr(e) + h.value_offset) + return (^V)(__dynamic_map_set_without_hash((^Raw_Map)(m), map_info(T), rawptr(&key), rawptr(&value), loc)) } |