From edcbd478004a175e2e926fe109d70d0a731d56a8 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 7 Dec 2020 14:01:50 -0500 Subject: gl_shader_decompiler: Elide unnecessary copies within DeclareConstantBuffers() Resolves a -Wrange-loop-analysis warning. --- src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 0c97a8988..ccbdfe967 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -878,7 +878,7 @@ private: } u32 binding = device.GetBaseBindings(stage).uniform_buffer; - for (const auto [index, info] : ir.GetConstantBuffers()) { + for (const auto& [index, info] : ir.GetConstantBuffers()) { const u32 num_elements = Common::AlignUp(info.GetSize(), 4) / 4; const u32 size = info.IsIndirect() ? MAX_CONSTBUFFER_ELEMENTS : num_elements; code.AddLine("layout (std140, binding = {}) uniform {} {{", binding++, -- cgit v1.2.3