style: better local variables

This commit is contained in:
2025-11-10 15:39:26 +01:00
parent cfbeeda57a
commit a8af10c1c5
10 changed files with 107 additions and 124 deletions
+2 -6
View File
@@ -3,9 +3,7 @@
#include "arr.h"
unsigned int arr_uint_index_of(UintArray array, unsigned int value) {
unsigned int i;
for (i = 0; i < array.length; i++) {
for (unsigned int i = 0; i < array.length; i++) {
if (array.values[i] == value) {
return i;
}
@@ -15,9 +13,7 @@ unsigned int arr_uint_index_of(UintArray array, unsigned int value) {
}
unsigned int arr_uint_remap_index(UintArray offsets, unsigned int *index) {
unsigned int i;
for (i = offsets.length - 1; i > 0; i--) {
for (unsigned int i = offsets.length - 1; i > 0; i--) {
if (*index >= offsets.values[i]) {
*index -= offsets.values[i];
return i;