mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-29 02:40:05 +00:00
Removed implicit assignments for container allocators in the Base and Core packages
This commit is contained in:
@@ -587,9 +587,11 @@ map_reserve_dynamic :: #force_no_inline proc "odin" (#no_alias m: ^Raw_Map, #no_
|
||||
return size_of(uintptr)*8 - 1 - z
|
||||
}
|
||||
|
||||
if m.allocator.procedure == nil {
|
||||
m.allocator = context.allocator
|
||||
}
|
||||
// Note(Ed) - Sectr Fork: Not a fan. (I want it to assert)
|
||||
// if m.allocator.procedure == nil {
|
||||
// m.allocator = context.allocator
|
||||
// }
|
||||
assert( m.allocator.procedure != nil)
|
||||
|
||||
new_capacity := new_capacity
|
||||
old_capacity := uintptr(map_cap(m^))
|
||||
@@ -642,9 +644,11 @@ map_reserve_dynamic :: #force_no_inline proc "odin" (#no_alias m: ^Raw_Map, #no_
|
||||
|
||||
@(require_results)
|
||||
map_shrink_dynamic :: #force_no_inline proc "odin" (#no_alias m: ^Raw_Map, #no_alias info: ^Map_Info, loc := #caller_location) -> (did_shrink: bool, err: Allocator_Error) {
|
||||
if m.allocator.procedure == nil {
|
||||
m.allocator = context.allocator
|
||||
}
|
||||
// Note(Ed) - Sectr Fork: Not a fan. (I want it to assert)
|
||||
// if m.allocator.procedure == nil {
|
||||
// m.allocator = context.allocator
|
||||
// }
|
||||
assert( m.allocator.procedure != nil)
|
||||
|
||||
// Cannot shrink the capacity if the number of items in the map would exceed
|
||||
// one minus the current log2 capacity's resize threshold. That is the shrunk
|
||||
|
||||
Reference in New Issue
Block a user