From 5e4c2276081371913d7a46f0a02292e5d522c3e1 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 19 May 2019 02:33:32 -0400 Subject: gl_shader_disk_cache: Make variable non-const in decompiled entry case std::move does nothing when applied to a const variable. Resources can't be moved if the object is immutable. With this change, we don't end up making several unnecessary heap allocations and copies. --- src/video_core/renderer_opengl/gl_shader_disk_cache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp b/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp index 1ba16d4ca..15b9fc6af 100644 --- a/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp @@ -243,7 +243,7 @@ ShaderDiskCacheOpenGL::LoadPrecompiledFile(FileUtil::IOFile& file) { return {}; } - const auto entry = LoadDecompiledEntry(); + auto entry = LoadDecompiledEntry(); if (!entry) { return {}; } -- cgit v1.2.3