summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2019-05-19 02:53:38 -0400
committerGravatar Lioncash2019-05-19 02:55:18 -0400
commit0a7f09a99b915042269fac8d117326c20f72e7bf (patch)
tree2bcdb940f1c5d48c2544e628295850818ba8db49 /src
parentgl_shader_disk_cache: Default ShaderDiskCacheOpenGL's destructor in the cpp file (diff)
downloadyuzu-0a7f09a99b915042269fac8d117326c20f72e7bf.tar.gz
yuzu-0a7f09a99b915042269fac8d117326c20f72e7bf.tar.xz
yuzu-0a7f09a99b915042269fac8d117326c20f72e7bf.zip
gl_shader_disk_cache: in-class initialize virtual file offset of ShaderDiskCacheOpenGL
Given the offset is assigned a fixed value in the constructor, we can just assign it directly and get rid of the need to write the name of the variable again in the constructor initializer list.
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_disk_cache.cpp3
-rw-r--r--src/video_core/renderer_opengl/gl_shader_disk_cache.h5
2 files changed, 3 insertions, 5 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 c446945ee..fba9c594a 100644
--- a/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp
@@ -104,8 +104,7 @@ bool ShaderDiskCacheRaw::Save(FileUtil::IOFile& file) const {
104 return true; 104 return true;
105} 105}
106 106
107ShaderDiskCacheOpenGL::ShaderDiskCacheOpenGL(Core::System& system) 107ShaderDiskCacheOpenGL::ShaderDiskCacheOpenGL(Core::System& system) : system{system} {}
108 : system{system}, precompiled_cache_virtual_file_offset{0} {}
109 108
110ShaderDiskCacheOpenGL::~ShaderDiskCacheOpenGL() = default; 109ShaderDiskCacheOpenGL::~ShaderDiskCacheOpenGL() = default;
111 110
diff --git a/src/video_core/renderer_opengl/gl_shader_disk_cache.h b/src/video_core/renderer_opengl/gl_shader_disk_cache.h
index bafd3b3f2..2da0a4a23 100644
--- a/src/video_core/renderer_opengl/gl_shader_disk_cache.h
+++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.h
@@ -285,11 +285,10 @@ private:
285 Core::System& system; 285 Core::System& system;
286 // Stored transferable shaders 286 // Stored transferable shaders
287 std::map<u64, std::unordered_set<ShaderDiskCacheUsage>> transferable; 287 std::map<u64, std::unordered_set<ShaderDiskCacheUsage>> transferable;
288 // Stores whole precompiled cache which will be read from or saved to the precompiled chache 288 // Stores whole precompiled cache which will be read from/saved to the precompiled cache file
289 // file
290 FileSys::VectorVfsFile precompiled_cache_virtual_file; 289 FileSys::VectorVfsFile precompiled_cache_virtual_file;
291 // Stores the current offset of the precompiled cache file for IO purposes 290 // Stores the current offset of the precompiled cache file for IO purposes
292 std::size_t precompiled_cache_virtual_file_offset; 291 std::size_t precompiled_cache_virtual_file_offset = 0;
293 292
294 // The cache has been loaded at boot 293 // The cache has been loaded at boot
295 bool tried_to_load{}; 294 bool tried_to_load{};