X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fvisitor.cpp;h=cc030eab7e31f33e71a8cb575f3013c7fdeab0df;hb=d8bdf61007978e2c3670a22a58e2f105e8347537;hp=8c8056c56352c99a56ca3a7e5b21e298026e5fbe;hpb=2a9f8f3803e1b57e0e5325454266d4e701b38cc5;p=libs%2Fgl.git diff --git a/source/glsl/visitor.cpp b/source/glsl/visitor.cpp index 8c8056c5..cc030eab 100644 --- a/source/glsl/visitor.cpp +++ b/source/glsl/visitor.cpp @@ -21,11 +21,6 @@ void TraversingVisitor::visit(RefPtr &expr) expr->visit(*this); } -void TraversingVisitor::visit(ParenthesizedExpression &parexpr) -{ - visit(parexpr.expression); -} - void TraversingVisitor::visit(MemberAccess &memacc) { visit(memacc.left); @@ -53,6 +48,13 @@ void TraversingVisitor::visit(Assignment &assign) visit(assign.right); } +void TraversingVisitor::visit(TernaryExpression &ternary) +{ + visit(ternary.condition); + visit(ternary.true_expr); + visit(ternary.false_expr); +} + void TraversingVisitor::visit(FunctionCall &call) { for(NodeArray::iterator i=call.arguments.begin(); i!=call.arguments.end(); ++i) @@ -189,7 +191,7 @@ void NodeRemover::visit(InterfaceBlock &iface) { if(to_remove->count(&iface)) { - remove_from_map(stage->interface_blocks, iface.interface+iface.name, iface); + remove_from_map(stage->interface_blocks, iface.interface+iface.block_name, iface); if(!iface.instance_name.empty()) remove_from_map(stage->interface_blocks, "_"+iface.instance_name, iface); } @@ -200,7 +202,11 @@ void NodeRemover::visit(InterfaceBlock &iface) void NodeRemover::visit(FunctionDeclaration &func) { if(to_remove->count(&func)) + { remove_from_map(stage->functions, func.name, func); + if(!func.signature.empty()) + remove_from_map(stage->functions, func.name+func.signature, func); + } TraversingVisitor::visit(func); }