]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/visitor.cpp
Remove the using declarations from visitors
[libs/gl.git] / source / glsl / visitor.cpp
index cf0cca9612e92132e9a89f16471f788c8f7d00a1..1a7adcc5287a40894a20fc8a9a3926a84db01140 100644 (file)
@@ -15,6 +15,7 @@ void NodeVisitor::visit(Assignment &assign)
 
 void TraversingVisitor::visit(Block &block)
 {
+       SetForScope<Block *> set_block(current_block, &block);
        for(NodeList<Statement>::iterator i=block.body.begin(); i!=block.body.end(); ++i)
                (*i)->visit(*this);
 }
@@ -125,7 +126,7 @@ void NodeRemover::apply(Stage &s, const set<Node *> &tr)
 {
        stage = &s;
        to_remove = &tr;
-       visit(s.content);
+       s.content.visit(*this);
 }
 
 void NodeRemover::remove_variable(map<string, VariableDeclaration *> &vars, VariableDeclaration &decl)