summaryrefslogtreecommitdiff
path: root/src/core/file_sys/fssystem
diff options
context:
space:
mode:
authorGravatar FearlessTobi2024-02-19 16:00:46 +0100
committerGravatar FearlessTobi2024-02-19 16:00:46 +0100
commit310c1f50beb77fc5c6f9075029973161d4e51a4a (patch)
tree43a5699123e4930560fc5016faac7efb15b63f4e /src/core/file_sys/fssystem
parentcore/CMakeLists: Sort alphabetically (diff)
downloadyuzu-310c1f50beb77fc5c6f9075029973161d4e51a4a.tar.gz
yuzu-310c1f50beb77fc5c6f9075029973161d4e51a4a.tar.xz
yuzu-310c1f50beb77fc5c6f9075029973161d4e51a4a.zip
scope_exit: Make constexpr
Allows the use of the macro in constexpr-contexts. Also avoids some potential problems when nesting braces inside it.
Diffstat (limited to 'src/core/file_sys/fssystem')
-rw-r--r--src/core/file_sys/fssystem/fssystem_hierarchical_sha256_storage.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/file_sys/fssystem/fssystem_hierarchical_sha256_storage.cpp b/src/core/file_sys/fssystem/fssystem_hierarchical_sha256_storage.cpp
index caea0b8f8..a68fd973c 100644
--- a/src/core/file_sys/fssystem/fssystem_hierarchical_sha256_storage.cpp
+++ b/src/core/file_sys/fssystem/fssystem_hierarchical_sha256_storage.cpp
@@ -36,7 +36,9 @@ Result HierarchicalSha256Storage::Initialize(VirtualFile* base_storages, s32 lay
36 // Get the base storage size. 36 // Get the base storage size.
37 m_base_storage_size = base_storages[2]->GetSize(); 37 m_base_storage_size = base_storages[2]->GetSize();
38 { 38 {
39 auto size_guard = SCOPE_GUARD({ m_base_storage_size = 0; }); 39 auto size_guard = SCOPE_GUARD {
40 m_base_storage_size = 0;
41 };
40 R_UNLESS(m_base_storage_size <= static_cast<s64>(HashSize) 42 R_UNLESS(m_base_storage_size <= static_cast<s64>(HashSize)
41 << m_log_size_ratio << m_log_size_ratio, 43 << m_log_size_ratio << m_log_size_ratio,
42 ResultHierarchicalSha256BaseStorageTooLarge); 44 ResultHierarchicalSha256BaseStorageTooLarge);