Make simd_util index procs contextless where applicable

This commit is contained in:
Feoramund
2024-08-09 17:42:14 -04:00
parent 12dd0cb72a
commit c8a62ee4ec
4 changed files with 9 additions and 9 deletions

View File

@@ -1426,7 +1426,7 @@ Output:
*/
index_byte :: proc(s: string, c: byte) -> (res: int) {
_index_byte :: #force_inline proc(s: string, c: byte) -> int {
_index_byte :: #force_inline proc "contextless" (s: string, c: byte) -> int {
for i := 0; i < len(s); i += 1 {
if s[i] == c {
return i
@@ -1477,7 +1477,7 @@ Output:
*/
last_index_byte :: proc(s: string, c: byte) -> (res: int) {
_last_index_byte :: #force_inline proc(s: string, c: byte) -> int {
_last_index_byte :: #force_inline proc "contextless" (s: string, c: byte) -> int {
for i := len(s)-1; i >= 0; i -= 1 {
if s[i] == c {
return i