mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Merge pull request #3403 from iciuperca/master
Avoid loop index shadowing in vendor:OpenGL
This commit is contained in:
Vendored
+4
-4
@@ -787,8 +787,8 @@ when !GL_DEBUG {
|
|||||||
fmt.printf(" call: gl%s(", loc.procedure)
|
fmt.printf(" call: gl%s(", loc.procedure)
|
||||||
{
|
{
|
||||||
// add input arguments
|
// add input arguments
|
||||||
for arg, i in args[num_ret:] {
|
for arg, arg_index in args[num_ret:] {
|
||||||
if i > 0 { fmt.printf(", ") }
|
if arg_index > 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 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 {
|
if err == .INVALID_ENUM {
|
||||||
@@ -806,8 +806,8 @@ when !GL_DEBUG {
|
|||||||
fmt.printf(") -> %v \n", args[0])
|
fmt.printf(") -> %v \n", args[0])
|
||||||
} else if num_ret > 1 {
|
} else if num_ret > 1 {
|
||||||
fmt.printf(") -> (")
|
fmt.printf(") -> (")
|
||||||
for arg, i in args[1:num_ret] {
|
for arg, arg_index in args[1:num_ret] {
|
||||||
if i > 0 { fmt.printf(", ") }
|
if arg_index > 0 { fmt.printf(", ") }
|
||||||
fmt.printf("%v", arg)
|
fmt.printf("%v", arg)
|
||||||
}
|
}
|
||||||
fmt.printf(")\n")
|
fmt.printf(")\n")
|
||||||
|
|||||||
Reference in New Issue
Block a user