X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fglsl%2Fdebug.cpp;h=60ac76f252594f79b823f30cc8c1f015766e4d92;hp=5b142019150441f3fd7291f03db30473e401631b;hb=5871764de7aa23d2c40cac03ad9d07088fb57e06;hpb=394b57279ff26781bfbba6d6f2b8ee1a25877e23 diff --git a/source/glsl/debug.cpp b/source/glsl/debug.cpp index 5b142019..60ac76f2 100644 --- a/source/glsl/debug.cpp +++ b/source/glsl/debug.cpp @@ -305,11 +305,11 @@ void DumpTree::visit(BasicTypeDeclaration &type) vector branches; if(type.base_type) - branches.push_back(format("%s: %%%d %s", (type.kind==BasicTypeDeclaration::ALIAS ? "Alias of" : "Base"), get_label(*type.base_type), type.base_type->name)); + branches.emplace_back(format("%s: %%%d %s", (type.kind==BasicTypeDeclaration::ALIAS ? "Alias of" : "Base"), get_label(*type.base_type), type.base_type->name)); if(type.kind==BasicTypeDeclaration::VECTOR) - branches.push_back(format("Vector: %d", type.size)); + branches.emplace_back(format("Vector: %d", type.size)); else if(type.kind==BasicTypeDeclaration::MATRIX) - branches.push_back(format("Matrix: %dx%d", type.size&0xFFFF, type.size>>16)); + branches.emplace_back(format("Matrix: %dx%d", type.size&0xFFFF, type.size>>16)); append_subtree(branches); } @@ -320,11 +320,11 @@ void DumpTree::visit(ImageTypeDeclaration &type) append(type, format("%%%d typedef %s", get_label(type), type.name)); vector branches; - branches.push_back(format("Dimensions: %s%s", dims[type.dimensions-1], (type.array ? " array" : ""))); + branches.emplace_back(format("Dimensions: %s%s", dims[type.dimensions-1], (type.array ? " array" : ""))); if(type.base_type) - branches.push_back(format("Element type: %%%d %s", get_label(*type.base_type), type.base_type->name)); + branches.emplace_back(format("Element type: %%%d %s", get_label(*type.base_type), type.base_type->name)); if(type.shadow) - branches.push_back("Shadow"); + branches.emplace_back("Shadow"); append_subtree(branches); } @@ -362,7 +362,7 @@ void DumpTree::visit(VariableDeclaration &var) if(var.array) { if(var.array_size) - branches.push_back(Branch("Array []", var.array_size.get())); + branches.emplace_back("Array []", var.array_size.get()); else branches.push_back("Array []"); } @@ -421,10 +421,10 @@ void DumpTree::visit(Conditional &cond) append(cond, "if()"); vector branches; - branches.push_back(cond.condition.get()); - branches.push_back(Branch("then", &cond.body)); + branches.emplace_back(cond.condition.get()); + branches.emplace_back("then", &cond.body); if(!cond.else_body.body.empty()) - branches.push_back(Branch("else", &cond.else_body)); + branches.emplace_back("else", &cond.else_body); append_subtree(branches); } @@ -434,12 +434,12 @@ void DumpTree::visit(Iteration &iter) vector branches; if(iter.init_statement) - branches.push_back(Branch("Initialization", iter.init_statement.get())); + branches.emplace_back("Initialization", iter.init_statement.get()); if(iter.condition) - branches.push_back(Branch("Condition", iter.condition.get())); + branches.emplace_back("Condition", iter.condition.get()); if(iter.loop_expression) - branches.push_back(Branch("Loop", iter.loop_expression.get())); - branches.push_back(&iter.body); + branches.emplace_back("Loop", iter.loop_expression.get()); + branches.emplace_back(&iter.body); append_subtree(branches); }