diff options
| author | 2019-05-19 02:33:32 -0400 | |
|---|---|---|
| committer | 2019-05-19 02:46:44 -0400 | |
| commit | 5e4c2276081371913d7a46f0a02292e5d522c3e1 (patch) | |
| tree | 72fe256eddaf84878cb66f42a04961c225f26bb8 /src | |
| parent | gl_shader_disk_cache: Special-case boolean handling (diff) | |
| download | yuzu-5e4c2276081371913d7a46f0a02292e5d522c3e1.tar.gz yuzu-5e4c2276081371913d7a46f0a02292e5d522c3e1.tar.xz yuzu-5e4c2276081371913d7a46f0a02292e5d522c3e1.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_disk_cache.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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) { | |||
| 243 | return {}; | 243 | return {}; |
| 244 | } | 244 | } |
| 245 | 245 | ||
| 246 | const auto entry = LoadDecompiledEntry(); | 246 | auto entry = LoadDecompiledEntry(); |
| 247 | if (!entry) { | 247 | if (!entry) { |
| 248 | return {}; | 248 | return {}; |
| 249 | } | 249 | } |