diff options
| author | gingerBill <bill@gingerbill.org> | 2021-03-13 21:18:07 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-03-13 21:18:07 +0000 |
| commit | a60d22fefd957eeca7e7403c51e656dd552cad8b (patch) | |
| tree | 1b0bccef7346012f0338d53f5aebaaa9e998ec56 /core/runtime | |
| parent | 8123ff83a3ff7836a5abc7f28c63646f41a038e5 (diff) | |
Make trailing comma usage consistent
Diffstat (limited to 'core/runtime')
| -rw-r--r-- | core/runtime/core_builtin_soa.odin | 2 | ||||
| -rw-r--r-- | core/runtime/dynamic_map_internal.odin | 15 |
2 files changed, 8 insertions, 9 deletions
diff --git a/core/runtime/core_builtin_soa.odin b/core/runtime/core_builtin_soa.odin index 161c85bc5..fea0d7305 100644 --- a/core/runtime/core_builtin_soa.odin +++ b/core/runtime/core_builtin_soa.odin @@ -47,7 +47,7 @@ Raw_SOA_Footer_Slice :: struct { Raw_SOA_Footer_Dynamic_Array :: struct { len: int, cap: int, - allocator: Allocator + allocator: Allocator, } raw_soa_footer_slice :: proc(array: ^$T/#soa[]$E) -> (footer: ^Raw_SOA_Footer_Slice) { diff --git a/core/runtime/dynamic_map_internal.odin b/core/runtime/dynamic_map_internal.odin index f8a192b02..8b63e6a7b 100644 --- a/core/runtime/dynamic_map_internal.odin +++ b/core/runtime/dynamic_map_internal.odin @@ -274,16 +274,15 @@ __dynamic_map_set :: proc(h: Map_Header, hash: Map_Hash, value: rawptr, loc := # h.m.hashes[fr.hash_index] = index; } } - { - e := __dynamic_map_get_entry(h, index); - e.hash = hash.hash; - key := rawptr(uintptr(e) + h.key_offset); - mem_copy(key, hash.key_ptr, h.key_size); + e := __dynamic_map_get_entry(h, index); + e.hash = hash.hash; - val := rawptr(uintptr(e) + h.value_offset); - mem_copy(val, value, h.value_size); - } + key := rawptr(uintptr(e) + h.key_offset); + mem_copy(key, hash.key_ptr, h.key_size); + + val := rawptr(uintptr(e) + h.value_offset); + mem_copy(val, value, h.value_size); if __dynamic_map_full(h) { __dynamic_map_grow(h, loc); |