From a2ad3ca6f72b15e89ccc2f52ba6b17fe62f78202 Mon Sep 17 00:00:00 2001 From: iwubcode Date: Sun, 2 Jul 2023 13:58:07 -0500 Subject: VideoCommon: don't do pointer copies during graphics mod callback iteration --- Source/Core/VideoCommon/VertexShaderManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/Core/VideoCommon/VertexShaderManager.cpp') diff --git a/Source/Core/VideoCommon/VertexShaderManager.cpp b/Source/Core/VideoCommon/VertexShaderManager.cpp index 276b400ab3..41c06ad4ba 100644 --- a/Source/Core/VideoCommon/VertexShaderManager.cpp +++ b/Source/Core/VideoCommon/VertexShaderManager.cpp @@ -406,14 +406,14 @@ void VertexShaderManager::SetConstants(const std::vector& textures) std::vector projection_actions; if (g_ActiveConfig.bGraphicMods) { - for (const auto action : g_graphics_mod_manager->GetProjectionActions(xfmem.projection.type)) + for (const auto& action : g_graphics_mod_manager->GetProjectionActions(xfmem.projection.type)) { projection_actions.push_back(action); } for (const auto& texture : textures) { - for (const auto action : + for (const auto& action : g_graphics_mod_manager->GetProjectionTextureActions(xfmem.projection.type, texture)) { projection_actions.push_back(action); @@ -430,7 +430,7 @@ void VertexShaderManager::SetConstants(const std::vector& textures) auto corrected_matrix = LoadProjectionMatrix(); GraphicsModActionData::Projection projection{&corrected_matrix}; - for (auto action : projection_actions) + for (const auto& action : projection_actions) { action->OnProjection(&projection); } -- cgit v1.2.3