From 12d4c835db4687435850656490a67312808de667 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 18 Apr 2020 21:26:18 -0400 Subject: [PATCH] geometry_pipeline: std::move vertex handler in SetVertexHandler() std::function is allowed to internally allocate, so this prevents potential reallocations from occurring, should that case ever happen. --- src/video_core/geometry_pipeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video_core/geometry_pipeline.cpp b/src/video_core/geometry_pipeline.cpp index 0ddbda943..b7ec248ca 100644 --- a/src/video_core/geometry_pipeline.cpp +++ b/src/video_core/geometry_pipeline.cpp @@ -303,7 +303,7 @@ GeometryPipeline::GeometryPipeline(State& state) : state(state) {} GeometryPipeline::~GeometryPipeline() = default; void GeometryPipeline::SetVertexHandler(Shader::VertexHandler vertex_handler) { - this->vertex_handler = vertex_handler; + this->vertex_handler = std::move(vertex_handler); } void GeometryPipeline::Setup(Shader::ShaderEngine* shader_engine) {