diff options
| author | gingerBill <bill@gingerbill.org> | 2022-11-08 12:29:20 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-11-08 12:29:20 +0000 |
| commit | 2fc3da3fde70e4428d23e5f58b93482148c8d2ae (patch) | |
| tree | f1586df9494b6f179c295980188841cdaabe430f /core/runtime/dynamic_map_internal.odin | |
| parent | a74093784cea3637b445657541cb7fff2f374f50 (diff) | |
Change `Raw_Map.len` to `int` from `uintptr`
Diffstat (limited to 'core/runtime/dynamic_map_internal.odin')
| -rw-r--r-- | core/runtime/dynamic_map_internal.odin | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/runtime/dynamic_map_internal.odin b/core/runtime/dynamic_map_internal.odin index 983bfde35..4218912c9 100644 --- a/core/runtime/dynamic_map_internal.odin +++ b/core/runtime/dynamic_map_internal.odin @@ -139,7 +139,7 @@ map_cell_index_dynamic_const :: proc "contextless" (base: uintptr, #no_alias inf // len() for map map_len :: #force_inline proc "contextless" (m: Raw_Map) -> int { - return int(m.len) + return m.len } // cap() for map @@ -591,7 +591,7 @@ map_shrink_dynamic :: proc(#no_alias m: ^Raw_Map, #no_alias info: ^Map_Info) -> // one minus the current log2 capacity's resize threshold. That is the shrunk // map needs to be within the max load factor. log2_capacity := map_log2_cap(m^) - if m.len >= map_load_factor(log2_capacity - 1) { + if uintptr(m.len) >= map_load_factor(log2_capacity - 1) { return nil } |