diff options
author | Lioncash <mathew1800@gmail.com> | 2019-05-19 08:39:00 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-05-19 08:46:44 +0200 |
commit | 683c4e523f55cef1f22263010f2c26ed0e277af1 (patch) | |
tree | 4d91452c88af708cc993952aad8b924885570aa2 /src/video_core/renderer_opengl/gl_shader_disk_cache.cpp | |
parent | gl_shader_disk_cache: Make variable non-const in decompiled entry case (diff) | |
download | yuzu-683c4e523f55cef1f22263010f2c26ed0e277af1.tar yuzu-683c4e523f55cef1f22263010f2c26ed0e277af1.tar.gz yuzu-683c4e523f55cef1f22263010f2c26ed0e277af1.tar.bz2 yuzu-683c4e523f55cef1f22263010f2c26ed0e277af1.tar.lz yuzu-683c4e523f55cef1f22263010f2c26ed0e277af1.tar.xz yuzu-683c4e523f55cef1f22263010f2c26ed0e277af1.tar.zst yuzu-683c4e523f55cef1f22263010f2c26ed0e277af1.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_disk_cache.cpp | 4 |
1 files changed, 2 insertions, 2 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 15b9fc6af..4cfb88557 100644 --- a/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp @@ -287,13 +287,13 @@ std::optional<ShaderDiskCacheDecompiled> ShaderDiskCacheOpenGL::LoadDecompiledEn return {}; } - std::vector<u8> code(code_size); + std::string code(code_size, '\0'); if (!LoadArrayFromPrecompiled(code.data(), code.size())) { return {}; } ShaderDiskCacheDecompiled entry; - entry.code = std::string(reinterpret_cast<const char*>(code.data()), code_size); + entry.code = std::move(code); u32 const_buffers_count{}; if (!LoadObjectFromPrecompiled(const_buffers_count)) { |