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
+3 -3
View File
@@ -761,7 +761,7 @@ when !ODIN_DEBUG {
// There can be multiple errors, so we're required to continuously call glGetError until there are no more errors
for i := 0; /**/; i += 1 {
err := cast(Error_Enum)impl_GetError()
if err == .NO_ERROR do break
if err == .NO_ERROR { break }
fmt.printf("%d: glGetError() returned GL_%v\n", i, err)
@@ -770,7 +770,7 @@ when !ODIN_DEBUG {
{
// add input arguments
for arg, i in args[num_ret:] {
if i > 0 do fmt.printf(", ")
if i > 0 { fmt.printf(", ") }
if v, ok := arg.(u32); ok { // TODO: Assumes all u32 are GLenum (they're not, GLbitfield and GLuint are also mapped to u32), fix later by better typing
if err == .INVALID_ENUM {
@@ -789,7 +789,7 @@ when !ODIN_DEBUG {
} else if num_ret > 1 {
fmt.printf(") -> (")
for arg, i in args[1:num_ret] {
if i > 0 do fmt.printf(", ")
if i > 0 { fmt.printf(", ") }
fmt.printf("%v", arg)
}
fmt.printf(")\n")