diff options
Diffstat (limited to 'src/core/file_sys')
-rw-r--r-- | src/core/file_sys/control_metadata.h | 4 | ||||
-rw-r--r-- | src/core/file_sys/fs_directory.h | 4 | ||||
-rw-r--r-- | src/core/file_sys/fs_path_utility.h | 12 | ||||
-rw-r--r-- | src/core/file_sys/fssystem/fssystem_aes_xts_storage.h | 1 | ||||
-rw-r--r-- | src/core/file_sys/fssystem/fssystem_hierarchical_sha256_storage.cpp | 4 | ||||
-rw-r--r-- | src/core/file_sys/program_metadata.cpp | 4 | ||||
-rw-r--r-- | src/core/file_sys/system_archive/shared_font.cpp | 2 |
7 files changed, 20 insertions, 11 deletions
diff --git a/src/core/file_sys/control_metadata.h b/src/core/file_sys/control_metadata.h index 555b9d8f7..667efbbab 100644 --- a/src/core/file_sys/control_metadata.h +++ b/src/core/file_sys/control_metadata.h @@ -64,8 +64,8 @@ struct RawNACP { u64_le cache_storage_size; u64_le cache_storage_journal_size; u64_le cache_storage_data_and_journal_max_size; - u64_le cache_storage_max_index; - INSERT_PADDING_BYTES(0xE70); + u16_le cache_storage_max_index; + INSERT_PADDING_BYTES(0xE76); }; static_assert(sizeof(RawNACP) == 0x4000, "RawNACP has incorrect size."); diff --git a/src/core/file_sys/fs_directory.h b/src/core/file_sys/fs_directory.h index 25c9cb18a..3f90abb8f 100644 --- a/src/core/file_sys/fs_directory.h +++ b/src/core/file_sys/fs_directory.h @@ -3,6 +3,10 @@ #pragma once +#include <string_view> +#include "common/common_funcs.h" +#include "common/common_types.h" + namespace FileSys { constexpr inline size_t EntryNameLengthMax = 0x300; diff --git a/src/core/file_sys/fs_path_utility.h b/src/core/file_sys/fs_path_utility.h index e9011d065..5643141f9 100644 --- a/src/core/file_sys/fs_path_utility.h +++ b/src/core/file_sys/fs_path_utility.h @@ -447,7 +447,7 @@ public: char* replacement_path = nullptr; size_t replacement_path_size = 0; - SCOPE_EXIT({ + SCOPE_EXIT { if (replacement_path != nullptr) { if (std::is_constant_evaluated()) { delete[] replacement_path; @@ -455,7 +455,7 @@ public: Deallocate(replacement_path, replacement_path_size); } } - }); + }; // Perform path replacement, if necessary if (IsParentDirectoryPathReplacementNeeded(cur_path)) { @@ -1102,8 +1102,8 @@ public: R_SUCCEED(); } - static Result Normalize(char* dst, size_t dst_size, const char* path, size_t path_len, - const PathFlags& flags) { + static constexpr Result Normalize(char* dst, size_t dst_size, const char* path, size_t path_len, + const PathFlags& flags) { // Use StringTraits names for remainder of scope using namespace StringTraits; @@ -1199,7 +1199,7 @@ public: const size_t replaced_src_len = path_len - (src - path); char* replaced_src = nullptr; - SCOPE_EXIT({ + SCOPE_EXIT { if (replaced_src != nullptr) { if (std::is_constant_evaluated()) { delete[] replaced_src; @@ -1207,7 +1207,7 @@ public: Deallocate(replaced_src, replaced_src_len); } } - }); + }; if (std::is_constant_evaluated()) { replaced_src = new char[replaced_src_len]; diff --git a/src/core/file_sys/fssystem/fssystem_aes_xts_storage.h b/src/core/file_sys/fssystem/fssystem_aes_xts_storage.h index f342efb57..0e83ca1b9 100644 --- a/src/core/file_sys/fssystem/fssystem_aes_xts_storage.h +++ b/src/core/file_sys/fssystem/fssystem_aes_xts_storage.h @@ -3,6 +3,7 @@ #pragma once +#include <mutex> #include <optional> #include "core/crypto/aes_util.h" 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 // Get the base storage size. m_base_storage_size = base_storages[2]->GetSize(); { - auto size_guard = SCOPE_GUARD({ m_base_storage_size = 0; }); + auto size_guard = SCOPE_GUARD { + m_base_storage_size = 0; + }; R_UNLESS(m_base_storage_size <= static_cast<s64>(HashSize) << m_log_size_ratio << m_log_size_ratio, ResultHierarchicalSha256BaseStorageTooLarge); diff --git a/src/core/file_sys/program_metadata.cpp b/src/core/file_sys/program_metadata.cpp index ae4e441c9..289969cc4 100644 --- a/src/core/file_sys/program_metadata.cpp +++ b/src/core/file_sys/program_metadata.cpp @@ -98,7 +98,9 @@ Loader::ResultStatus ProgramMetadata::Load(VirtualFile file) { Loader::ResultStatus ProgramMetadata::Reload(VirtualFile file) { const u64 original_program_id = aci_header.title_id; - SCOPE_EXIT({ aci_header.title_id = original_program_id; }); + SCOPE_EXIT { + aci_header.title_id = original_program_id; + }; return this->Load(file); } diff --git a/src/core/file_sys/system_archive/shared_font.cpp b/src/core/file_sys/system_archive/shared_font.cpp index deb52069d..9ea16aa59 100644 --- a/src/core/file_sys/system_archive/shared_font.cpp +++ b/src/core/file_sys/system_archive/shared_font.cpp @@ -9,7 +9,7 @@ #include "core/file_sys/system_archive/data/font_standard.h" #include "core/file_sys/system_archive/shared_font.h" #include "core/file_sys/vfs/vfs_vector.h" -#include "core/hle/service/ns/iplatform_service_manager.h" +#include "core/hle/service/ns/platform_service_manager.h" namespace FileSys::SystemArchive { |