]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/visitor.cpp
Store types and interface blocks in Stage
[libs/gl.git] / source / glsl / visitor.cpp
index 051d92f6adfc1e48f9117a32797d3004f9759e10..fd25bf342a7ea588525be88079166453474c4e8e 100644 (file)
@@ -158,7 +158,7 @@ void NodeRemover::visit(Block &block)
 void NodeRemover::visit(StructDeclaration &strct)
 {
        if(to_remove->count(&strct))
-               remove_from_map(current_block->types, strct.name, strct);
+               remove_from_map(stage->types, strct.name, strct);
 }
 
 void NodeRemover::visit(VariableDeclaration &var)
@@ -178,9 +178,9 @@ void NodeRemover::visit(InterfaceBlock &iface)
 {
        if(to_remove->count(&iface))
        {
-               remove_from_map(current_block->interfaces, iface.name, iface);
+               remove_from_map(stage->interface_blocks, iface.name, iface);
                if(!iface.instance_name.empty())
-                       remove_from_map(current_block->interfaces, iface.instance_name, iface);
+                       remove_from_map(stage->interface_blocks, iface.instance_name, iface);
        }
        SetFlag set_recursive(recursive_remove, recursive_remove || to_remove->count(&iface));
        TraversingVisitor::visit(iface);