diff options
| author | Nia <108984073+kawaii-Code@users.noreply.github.com> | 2024-09-29 15:51:30 +0300 |
|---|---|---|
| committer | Nia <108984073+kawaii-Code@users.noreply.github.com> | 2024-09-29 15:51:30 +0300 |
| commit | 3c80f15a7a582924a8c0cda1ba30854a6457fb8e (patch) | |
| tree | 8fbeed52f3e93b915828bc544b001b7adbbc8e09 /core/slice | |
| parent | 3337d6b264dd69f1ad0004d93d78259bb48088d0 (diff) | |
Remove pointless `#no_bounds_check`
Diffstat (limited to 'core/slice')
| -rw-r--r-- | core/slice/slice.odin | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/slice/slice.odin b/core/slice/slice.odin index 5d0189b5d..5cd3660b4 100644 --- a/core/slice/slice.odin +++ b/core/slice/slice.odin @@ -106,7 +106,7 @@ contains :: proc(array: $T/[]$E, value: E) -> bool where intrinsics.type_is_comp */ @(require_results) linear_search :: proc(array: $A/[]$T, key: T) -> (index: int, found: bool) - where intrinsics.type_is_comparable(T) #no_bounds_check { + where intrinsics.type_is_comparable(T) { for x, i in array { if x == key { return i, true @@ -122,7 +122,7 @@ linear_search :: proc(array: $A/[]$T, key: T) -> (index: int, found: bool) or -1 if it is not present. */ @(require_results) -linear_search_proc :: proc(array: $A/[]$T, f: proc(T) -> bool) -> (index: int, found: bool) #no_bounds_check { +linear_search_proc :: proc(array: $A/[]$T, f: proc(T) -> bool) -> (index: int, found: bool) { for x, i in array { if f(x) { return i, true @@ -160,7 +160,7 @@ linear_search_proc :: proc(array: $A/[]$T, f: proc(T) -> bool) -> (index: int, f */ @(require_results) linear_search_reverse :: proc(array: $A/[]$T, key: T) -> (index: int, found: bool) - where intrinsics.type_is_comparable(T) #no_bounds_check { + where intrinsics.type_is_comparable(T) { #reverse for x, i in array { if x == key { return i, true @@ -177,7 +177,7 @@ linear_search_reverse :: proc(array: $A/[]$T, key: T) -> (index: int, found: boo or -1 if it is not present */ @(require_results) -linear_search_reverse_proc :: proc(array: $A/[]$T, f: proc(T) -> bool) -> (index: int, found: bool) #no_bounds_check { +linear_search_reverse_proc :: proc(array: $A/[]$T, f: proc(T) -> bool) -> (index: int, found: bool) { #reverse for x, i in array { if f(x) { return i, true |