Make core and vendor adhere to -vet, -strict-style, and -disallow-do

This commit is contained in:
gingerBill
2021-09-11 16:40:19 +01:00
parent 93593f4721
commit 344abf2cb2
48 changed files with 218 additions and 189 deletions
+7 -3
View File
@@ -135,9 +135,13 @@ has_suffix :: proc(array: $T/[]$E, needle: E) -> bool where intrinsics.type_is_c
return false
}
fill :: proc(array: $T/[]$E, value: E) {
for _, i in array {
array[i] = value
fill :: proc(array: $T/[]$E, value: E) #no_bounds_check {
if len(array) <= 0 {
return
}
array[0] = value
for i := 1; i < len(array); i *= 2 {
copy(array[i:], array[:i])
}
}