diff options
| author | JosJuice <josjuice@gmail.com> | 2020-10-20 11:33:38 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2020-10-20 11:33:38 +0200 |
| commit | 5b6f604d90fe15b9453171a1ec8ce2683437a6ee (patch) | |
| tree | ddd285d1f484d24f030e0282527889f24b1946c7 /Source/Core/DiscIO/WiiEncryptionCache.cpp | |
| parent | 409230e088daf88224e23aa2766154e4cbf796c5 (diff) | |
DiscIO: Make WiiEncryptionCache moveable
Fixes the following warning:
../../../../../../Core\DiscIO/DirectoryBlob.h:156:3: warning: explicitly defaulted move constructor is implicitly deleted [-Wdefaulted-function-deleted]
DirectoryBlobReader(DirectoryBlobReader&&) = default;
^
../../../../../../Core\DiscIO/DirectoryBlob.h:205:22: note: move constructor of 'DirectoryBlobReader' is implicitly deleted because field 'm_encryption_cache' has a deleted move constructor
WiiEncryptionCache m_encryption_cache;
^
Diffstat (limited to 'Source/Core/DiscIO/WiiEncryptionCache.cpp')
| -rw-r--r-- | Source/Core/DiscIO/WiiEncryptionCache.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/Core/DiscIO/WiiEncryptionCache.cpp b/Source/Core/DiscIO/WiiEncryptionCache.cpp index 52d978761e..68a307c956 100644 --- a/Source/Core/DiscIO/WiiEncryptionCache.cpp +++ b/Source/Core/DiscIO/WiiEncryptionCache.cpp @@ -29,7 +29,10 @@ WiiEncryptionCache::EncryptGroup(u64 offset, u64 partition_data_offset, { // Only allocate memory if this function actually ends up getting called if (!m_cache) + { m_cache = std::make_unique<std::array<u8, VolumeWii::GROUP_TOTAL_SIZE>>(); + m_cached_offset = std::numeric_limits<u64>::max(); + } ASSERT(offset % VolumeWii::GROUP_TOTAL_SIZE == 0); const u64 group_offset_in_partition = |
