]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/optimize.cpp
Add push_back_nocopy to NodeContainer for clarity
[libs/gl.git] / source / glsl / optimize.cpp
index d57002552540c6c375cb7446f8465a9538a0a42d..b7a722f42c96c6cc718de3b964697ac9416822bb 100644 (file)
@@ -102,8 +102,7 @@ const string &InlineContentInjector::apply(Stage &stage, FunctionDeclaration &ta
                SetForScope<Pass> set_pass(pass, RENAME);
                var->visit(*this);
 
                SetForScope<Pass> set_pass(pass, RENAME);
                var->visit(*this);
 
-               staging_block.body.push_back(0);
-               staging_block.body.back() = var;
+               staging_block.body.push_back_nocopy(var);
                params.push_back(var);
        }
 
                params.push_back(var);
        }
 
@@ -117,8 +116,7 @@ const string &InlineContentInjector::apply(Stage &stage, FunctionDeclaration &ta
                SetForScope<Pass> set_pass(pass, RENAME);
                r_inlined_statement->visit(*this);
 
                SetForScope<Pass> set_pass(pass, RENAME);
                r_inlined_statement->visit(*this);
 
-               staging_block.body.push_back(0);
-               staging_block.body.back() = r_inlined_statement;
+               staging_block.body.push_back_nocopy(r_inlined_statement);
        }
 
        /* Now collect names from the staging block.  Local variables that would
        }
 
        /* Now collect names from the staging block.  Local variables that would