]> git.tdb.fi Git - libs/gl.git/commitdiff
Visit iteration statement components in semantically correct order
authorMikko Rasa <tdb@tdb.fi>
Wed, 3 Mar 2021 18:01:35 +0000 (20:01 +0200)
committerMikko Rasa <tdb@tdb.fi>
Thu, 4 Mar 2021 00:26:15 +0000 (02:26 +0200)
source/glsl/visitor.cpp

index 3d832c73789b635e25978d23be803ff7ad164507..fa6e614c6394a1705e4d45b6214fc55efbc760a1 100644 (file)
@@ -102,9 +102,9 @@ void TraversingVisitor::visit(Iteration &iter)
                iter.init_statement->visit(*this);
        if(iter.condition)
                iter.condition->visit(*this);
+       iter.body.visit(*this);
        if(iter.loop_expression)
                iter.loop_expression->visit(*this);
-       iter.body.visit(*this);
 }
 
 void TraversingVisitor::visit(Passthrough &pass)