forked from ShuriZma/suyu
1
0
Fork 0

gl_shader_disk_cache: Default ShaderDiskCacheOpenGL's destructor in the cpp file

Given the disk shader cache contains non-trivial types, we should
default it in the cpp file in order to prevent inlining of the
complex destruction logic.
This commit is contained in:
Lioncash 2019-05-19 02:50:47 -04:00
parent 7fdc644c44
commit 634b78a4c6
2 changed files with 3 additions and 0 deletions

View File

@ -107,6 +107,8 @@ bool ShaderDiskCacheRaw::Save(FileUtil::IOFile& file) const {
ShaderDiskCacheOpenGL::ShaderDiskCacheOpenGL(Core::System& system) ShaderDiskCacheOpenGL::ShaderDiskCacheOpenGL(Core::System& system)
: system{system}, precompiled_cache_virtual_file_offset{0} {} : system{system}, precompiled_cache_virtual_file_offset{0} {}
ShaderDiskCacheOpenGL::~ShaderDiskCacheOpenGL() = default;
std::optional<std::pair<std::vector<ShaderDiskCacheRaw>, std::vector<ShaderDiskCacheUsage>>> std::optional<std::pair<std::vector<ShaderDiskCacheRaw>, std::vector<ShaderDiskCacheUsage>>>
ShaderDiskCacheOpenGL::LoadTransferable() { ShaderDiskCacheOpenGL::LoadTransferable() {
// Skip games without title id // Skip games without title id

View File

@ -162,6 +162,7 @@ struct ShaderDiskCacheDump {
class ShaderDiskCacheOpenGL { class ShaderDiskCacheOpenGL {
public: public:
explicit ShaderDiskCacheOpenGL(Core::System& system); explicit ShaderDiskCacheOpenGL(Core::System& system);
~ShaderDiskCacheOpenGL();
/// Loads transferable cache. If file has a old version or on failure, it deletes the file. /// Loads transferable cache. If file has a old version or on failure, it deletes the file.
std::optional<std::pair<std::vector<ShaderDiskCacheRaw>, std::vector<ShaderDiskCacheUsage>>> std::optional<std::pair<std::vector<ShaderDiskCacheRaw>, std::vector<ShaderDiskCacheUsage>>>