diff options
| author | Damian Tarnawski <gthetarnav@gmail.com> | 2025-09-14 10:39:33 +0200 |
|---|---|---|
| committer | Damian Tarnawski <gthetarnav@gmail.com> | 2025-09-14 10:39:33 +0200 |
| commit | 3e62c2c79a7c3ffe41688733c4c13ead2a43e05b (patch) | |
| tree | efaad0c898bb75f5c35eff96060696cc8467a828 /core/container/small_array | |
| parent | 935d9657a37ab88a2a627a6dbe67c128d4029a76 (diff) | |
Add "contextless" to small_array get_safe and get_ptr_safe
Diffstat (limited to 'core/container/small_array')
| -rw-r--r-- | core/container/small_array/small_array.odin | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/container/small_array/small_array.odin b/core/container/small_array/small_array.odin index 49d441079..124307c52 100644 --- a/core/container/small_array/small_array.odin +++ b/core/container/small_array/small_array.odin @@ -169,7 +169,7 @@ Output: x */ -get_safe :: proc(a: $A/Small_Array($N, $T), index: int) -> (T, bool) #no_bounds_check { +get_safe :: proc "contextless" (a: $A/Small_Array($N, $T), index: int) -> (T, bool) #no_bounds_check { if index < 0 || index >= a.len { return {}, false } @@ -183,11 +183,11 @@ Get a pointer to the item at the specified position. - `a`: A pointer to the small-array - `index`: The position of the item to get -**Returns** +**Returns** - the pointer to the element at the specified position - true if element exists, false otherwise */ -get_ptr_safe :: proc(a: ^$A/Small_Array($N, $T), index: int) -> (^T, bool) #no_bounds_check { +get_ptr_safe :: proc "contextless" (a: ^$A/Small_Array($N, $T), index: int) -> (^T, bool) #no_bounds_check { if index < 0 || index >= a.len { return {}, false } |