X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fprogramcompiler.cpp;h=5a17a9ed3857bf969005e57a73ebe94d01b9ec20;hp=afb2a3c32ecac3465cfe8620e74f816beeb84473;hb=405c00de24374c282adb1116551a833b8130d76d;hpb=2f20c5941aef604c5a49eecebec0fb7f2d2f6dbd diff --git a/source/programcompiler.cpp b/source/programcompiler.cpp index afb2a3c3..5a17a9ed 100644 --- a/source/programcompiler.cpp +++ b/source/programcompiler.cpp @@ -1223,6 +1223,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);