mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
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.
This commit is contained in:
parent
634b78a4c6
commit
0a7f09a99b
2 changed files with 3 additions and 5 deletions
|
@ -104,8 +104,7 @@ bool ShaderDiskCacheRaw::Save(FileUtil::IOFile& file) const {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ShaderDiskCacheOpenGL::ShaderDiskCacheOpenGL(Core::System& system)
|
ShaderDiskCacheOpenGL::ShaderDiskCacheOpenGL(Core::System& system) : system{system} {}
|
||||||
: system{system}, precompiled_cache_virtual_file_offset{0} {}
|
|
||||||
|
|
||||||
ShaderDiskCacheOpenGL::~ShaderDiskCacheOpenGL() = default;
|
ShaderDiskCacheOpenGL::~ShaderDiskCacheOpenGL() = default;
|
||||||
|
|
||||||
|
|
|
@ -285,11 +285,10 @@ private:
|
||||||
Core::System& system;
|
Core::System& system;
|
||||||
// Stored transferable shaders
|
// Stored transferable shaders
|
||||||
std::map<u64, std::unordered_set<ShaderDiskCacheUsage>> transferable;
|
std::map<u64, std::unordered_set<ShaderDiskCacheUsage>> transferable;
|
||||||
// Stores whole precompiled cache which will be read from or saved to the precompiled chache
|
// Stores whole precompiled cache which will be read from/saved to the precompiled cache file
|
||||||
// file
|
|
||||||
FileSys::VectorVfsFile precompiled_cache_virtual_file;
|
FileSys::VectorVfsFile precompiled_cache_virtual_file;
|
||||||
// Stores the current offset of the precompiled cache file for IO purposes
|
// Stores the current offset of the precompiled cache file for IO purposes
|
||||||
std::size_t precompiled_cache_virtual_file_offset;
|
std::size_t precompiled_cache_virtual_file_offset = 0;
|
||||||
|
|
||||||
// The cache has been loaded at boot
|
// The cache has been loaded at boot
|
||||||
bool tried_to_load{};
|
bool tried_to_load{};
|
||||||
|
|
Loading…
Reference in a new issue