|
@@ -388,7 +388,7 @@ _make_dynamic_array_len_cap :: proc(array: ^Raw_Dynamic_Array, size_of_elem, ali
|
|
//
|
|
//
|
|
// Note: Prefer using the procedure group `make`.
|
|
// Note: Prefer using the procedure group `make`.
|
|
@(builtin, require_results)
|
|
@(builtin, require_results)
|
|
-make_map :: proc($T: typeid/map[$K]$E, allocator := context.allocator) -> (m: T) {
|
|
|
|
|
|
+make_map :: proc($T: typeid/map[$K]$E, allocator := context.allocator, loc := #caller_location) -> (m: T) {
|
|
m.allocator = allocator
|
|
m.allocator = allocator
|
|
return m
|
|
return m
|
|
}
|
|
}
|
|
@@ -399,7 +399,7 @@ make_map :: proc($T: typeid/map[$K]$E, allocator := context.allocator) -> (m: T)
|
|
//
|
|
//
|
|
// Note: Prefer using the procedure group `make`.
|
|
// Note: Prefer using the procedure group `make`.
|
|
@(builtin, require_results)
|
|
@(builtin, require_results)
|
|
-make_map_cap :: proc($T: typeid/map[$K]$E, #any_int capacity: int = 1<<MAP_MIN_LOG2_CAPACITY, allocator := context.allocator, loc := #caller_location) -> (m: T, err: Allocator_Error) #optional_allocator_error {
|
|
|
|
|
|
+make_map_cap :: proc($T: typeid/map[$K]$E, #any_int capacity: int, allocator := context.allocator, loc := #caller_location) -> (m: T, err: Allocator_Error) #optional_allocator_error {
|
|
make_map_expr_error_loc(loc, capacity)
|
|
make_map_expr_error_loc(loc, capacity)
|
|
context.allocator = allocator
|
|
context.allocator = allocator
|
|
|
|
|