summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/fssystem/fssystem_hierarchical_integrity_verification_storage.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-08-11 03:49:19 +0200
committerLiam <byteslice@airmail.cc>2023-08-15 23:47:25 +0200
commit0398b34370f9a6d739e0101378770c7d592a4806 (patch)
tree9affd31d1ef4d41ccadb06eff1357ee228805b20 /src/core/file_sys/fssystem/fssystem_hierarchical_integrity_verification_storage.cpp
parentvfs: expand support for NCA reading (diff)
downloadyuzu-0398b34370f9a6d739e0101378770c7d592a4806.tar
yuzu-0398b34370f9a6d739e0101378770c7d592a4806.tar.gz
yuzu-0398b34370f9a6d739e0101378770c7d592a4806.tar.bz2
yuzu-0398b34370f9a6d739e0101378770c7d592a4806.tar.lz
yuzu-0398b34370f9a6d739e0101378770c7d592a4806.tar.xz
yuzu-0398b34370f9a6d739e0101378770c7d592a4806.tar.zst
yuzu-0398b34370f9a6d739e0101378770c7d592a4806.zip
Diffstat (limited to 'src/core/file_sys/fssystem/fssystem_hierarchical_integrity_verification_storage.cpp')
-rw-r--r--src/core/file_sys/fssystem/fssystem_hierarchical_integrity_verification_storage.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/core/file_sys/fssystem/fssystem_hierarchical_integrity_verification_storage.cpp b/src/core/file_sys/fssystem/fssystem_hierarchical_integrity_verification_storage.cpp
index b2e031d5f..4a75b5308 100644
--- a/src/core/file_sys/fssystem/fssystem_hierarchical_integrity_verification_storage.cpp
+++ b/src/core/file_sys/fssystem/fssystem_hierarchical_integrity_verification_storage.cpp
@@ -17,8 +17,6 @@ Result HierarchicalIntegrityVerificationStorage::Initialize(
const HierarchicalIntegrityVerificationInformation& info,
HierarchicalStorageInformation storage, int max_data_cache_entries, int max_hash_cache_entries,
s8 buffer_level) {
- using AlignedStorage = AlignmentMatchingStoragePooledBuffer<1>;
-
// Validate preconditions.
ASSERT(IntegrityMinLayerCount <= info.max_layers && info.max_layers <= IntegrityMaxLayerCount);
@@ -38,8 +36,7 @@ Result HierarchicalIntegrityVerificationStorage::Initialize(
};
// Initialize the top level buffer storage.
- m_buffer_storages[0] = std::make_shared<AlignedStorage>(
- m_verify_storages[0], static_cast<s64>(1) << info.info[0].block_order);
+ m_buffer_storages[0] = m_verify_storages[0];
R_UNLESS(m_buffer_storages[0] != nullptr, ResultAllocationMemoryFailedAllocateShared);
// Prepare to initialize the level storages.
@@ -65,8 +62,7 @@ Result HierarchicalIntegrityVerificationStorage::Initialize(
static_cast<s64>(1) << info.info[level].block_order, false);
// Initialize the buffer storage.
- m_buffer_storages[level + 1] = std::make_shared<AlignedStorage>(
- m_verify_storages[level + 1], static_cast<s64>(1) << info.info[level + 1].block_order);
+ m_buffer_storages[level + 1] = m_verify_storages[level + 1];
R_UNLESS(m_buffer_storages[level + 1] != nullptr,
ResultAllocationMemoryFailedAllocateShared);
}
@@ -82,8 +78,7 @@ Result HierarchicalIntegrityVerificationStorage::Initialize(
static_cast<s64>(1) << info.info[level].block_order, true);
// Initialize the buffer storage.
- m_buffer_storages[level + 1] = std::make_shared<AlignedStorage>(
- m_verify_storages[level + 1], static_cast<s64>(1) << info.info[level + 1].block_order);
+ m_buffer_storages[level + 1] = m_verify_storages[level + 1];
R_UNLESS(m_buffer_storages[level + 1] != nullptr,
ResultAllocationMemoryFailedAllocateShared);
}