]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/renderer.cpp
Use emplace_back when a new object is being constructed
[libs/gl.git] / source / render / renderer.cpp
index 58a56ff2f2d105e5213e9b6a6cd837ea68f06e0e..45ad120045397de5848e4cecfe1968f39e83433b 100644 (file)
@@ -32,7 +32,7 @@ void Renderer::begin()
        if(current_state)
                throw invalid_operation("Renderer::begin");
 
-       state_stack.push_back(State());
+       state_stack.emplace_back();
        current_state = &state_stack.back();
 
        RendererBackend::begin();
@@ -163,7 +163,7 @@ void Renderer::set_texture(Tag tag, const Texture *tex, const Sampler *samp)
                        break;
                }
 
-       texture_stack.push_back(BoundTexture());
+       texture_stack.emplace_back();
        BoundTexture &bound_tex = texture_stack.back();
        bound_tex.tag = tag;
        bound_tex.texture = tex;