X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fprogramcompiler.cpp;h=7cf79515234bb445ef781d0c39be60c7d749561f;hb=ef9ffbc287417520d223ce29dc6c2de110cac945;hp=afb2a3c32ecac3465cfe8620e74f816beeb84473;hpb=48453f59ec93d9b8f70a17d3034e5ca3e4780ecd;p=libs%2Fgl.git diff --git a/source/programcompiler.cpp b/source/programcompiler.cpp index afb2a3c3..7cf79515 100644 --- a/source/programcompiler.cpp +++ b/source/programcompiler.cpp @@ -8,6 +8,8 @@ #include "resources.h" #include "shader.h" +#undef interface + using namespace std; namespace { @@ -1223,6 +1225,13 @@ void ProgramCompiler::FunctionInliner::visit(FunctionCall &call) inline_result = 0; } +void ProgramCompiler::FunctionInliner::visit(VariableDeclaration &var) +{ + if(var.init_expression) + visit_and_inline(var.init_expression); + inline_result = 0; +} + void ProgramCompiler::FunctionInliner::visit(Return &ret) { TraversingVisitor::visit(ret);