]> git.tdb.fi Git - libs/gl.git/commitdiff
Don't check the address of an inline array
authorMikko Rasa <tdb@tdb.fi>
Thu, 11 Nov 2021 11:41:22 +0000 (13:41 +0200)
committerMikko Rasa <tdb@tdb.fi>
Thu, 11 Nov 2021 11:41:22 +0000 (13:41 +0200)
It always evaluates as true, not that it matters greatly in this case.

source/glsl/output.cpp

index c2c54f9ff33834d11d681a0e80e976aa75747b39..6b76167468b73d52b16d67e78995dc0961c6c62d 100644 (file)
@@ -200,7 +200,7 @@ void Formatter::visit(TernaryExpression &ternary)
        visit_expression(*ternary.condition, ternary.oper, false);
        append(ternary.oper->token);
        visit_expression(*ternary.true_expr, ternary.oper, false);
-       if(ternary.oper->token2)
+       if(ternary.oper->token2[0])
                append(ternary.oper->token2);
        visit_expression(*ternary.false_expr, ternary.oper, true);
 }