Change map_reserve_dynamic no do anything when current capacity is greater than specified for the reserve

This commit is contained in:
gingerBill
2022-11-11 11:24:34 +00:00
parent b475481788
commit 5d47e2a166
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -300,7 +300,7 @@ shrink_map :: proc(m: ^$T/map[$K]$V, loc := #caller_location) -> (did_shrink: bo
delete_key :: proc(m: ^$T/map[$K]$V, key: K) -> (deleted_key: K, deleted_value: V) {
if m != nil {
key := key
old_k, old_v, ok := map_erase_dynamic((^Raw_Map)(m), map_info(T), uintptr(&key))
old_k, old_v, ok := map_erase_dynamic((^Raw_Map)(m), map_info(T), uintptr(&key))
if ok {
deleted_key = (^K)(old_k)^
deleted_value = (^V)(old_v)^