mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-21 23:12:03 -07:00
Core library clean up: Make range expressions more consistent and replace uses of .. with ..=
This commit is contained in:
@@ -42,7 +42,7 @@ semaphore_destroy :: proc(s: ^Semaphore) {
|
||||
|
||||
semaphore_post :: proc(s: ^Semaphore, count := 1) {
|
||||
// NOTE: SPEED: If there's one syscall to do this, we should use it instead of the loop.
|
||||
for in 0..count-1 {
|
||||
for in 0..<count {
|
||||
res := darwin.semaphore_signal(s.handle);
|
||||
assert(res == 0);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ semaphore_destroy :: proc(s: ^Semaphore) {
|
||||
|
||||
semaphore_post :: proc(s: ^Semaphore, count := 1) {
|
||||
// NOTE: SPEED: If there's one syscall to do this, we should use it instead of the loop.
|
||||
for in 0..count-1 {
|
||||
for in 0..<count {
|
||||
assert(unix.sem_post(&s.handle) == 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ semaphore_destroy :: proc(s: ^Semaphore) {
|
||||
|
||||
semaphore_post :: proc(s: ^Semaphore, count := 1) {
|
||||
// NOTE: SPEED: If there's one syscall to do this, we should use it instead of the loop.
|
||||
for in 0..count-1 {
|
||||
for in 0..<count {
|
||||
assert(unix.sem_post(&s.handle) == 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user