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
+8 -8
View File
@@ -29,7 +29,7 @@ clone_array :: proc(array: $A/[]^$T) -> A {
}
res := make(A, len(array))
for elem, i in array {
res[i] = auto_cast clone(elem)
res[i] = (^T)(clone(elem))
}
return res
}
@@ -40,7 +40,7 @@ clone_dynamic_array :: proc(array: $A/[dynamic]^$T) -> A {
}
res := make(A, len(array))
for elem, i in array {
res[i] = auto_cast clone(elem)
res[i] = (^T)(clone(elem))
}
return res
}
@@ -169,10 +169,10 @@ clone_node :: proc(node: ^Node) -> ^Node {
r.lhs = clone(r.lhs)
r.rhs = clone(r.rhs)
case Block_Stmt:
r.label = auto_cast clone(r.label)
r.label = clone(r.label)
r.stmts = clone(r.stmts)
case If_Stmt:
r.label = auto_cast clone(r.label)
r.label = clone(r.label)
r.init = clone(r.init)
r.cond = clone(r.cond)
r.body = clone(r.body)
@@ -186,13 +186,13 @@ clone_node :: proc(node: ^Node) -> ^Node {
case Defer_Stmt:
r.stmt = clone(r.stmt)
case For_Stmt:
r.label = auto_cast clone(r.label)
r.label = clone(r.label)
r.init = clone(r.init)
r.cond = clone(r.cond)
r.post = clone(r.post)
r.body = clone(r.body)
case Range_Stmt:
r.label = auto_cast clone(r.label)
r.label = clone(r.label)
r.vals = clone(r.vals)
r.expr = clone(r.expr)
r.body = clone(r.body)
@@ -200,12 +200,12 @@ clone_node :: proc(node: ^Node) -> ^Node {
r.list = clone(r.list)
r.body = clone(r.body)
case Switch_Stmt:
r.label = auto_cast clone(r.label)
r.label = clone(r.label)
r.init = clone(r.init)
r.cond = clone(r.cond)
r.body = clone(r.body)
case Type_Switch_Stmt:
r.label = auto_cast clone(r.label)
r.label = clone(r.label)
r.tag = clone(r.tag)
r.expr = clone(r.expr)
r.body = clone(r.body)