From 18a89931a981d473e0eb64e7b7d34a2770066760 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 2 Sep 2018 13:10:02 -0400 Subject: gl_shader_decompiler: Use used_shaders member variable directly within GenerateDeclarations() Using the getter function intended for external code here makes an unnecessary copy of the already-accessible used_shaders vector. --- src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index c4e7e1e3b..d3e8f5078 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -441,7 +441,7 @@ public: declarations.AddNewLine(); // Append the sampler2D array for the used textures. - size_t num_samplers = GetSamplers().size(); + const size_t num_samplers = used_samplers.size(); if (num_samplers > 0) { declarations.AddLine("uniform sampler2D " + SamplerEntry::GetArrayName(stage) + '[' + std::to_string(num_samplers) + "];"); -- cgit v1.2.3