Explorar o código

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.
Lioncash %!s(int64=7) %!d(string=hai) anos
pai
achega
5e4c227608
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/video_core/renderer_opengl/gl_shader_disk_cache.cpp

+ 1 - 1
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 {};
             }