summaryrefslogtreecommitdiff
path: root/src/core/file_sys/romfs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/file_sys/romfs.cpp')
-rw-r--r--src/core/file_sys/romfs.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/file_sys/romfs.cpp b/src/core/file_sys/romfs.cpp
index ebbdf081e..c909d1ce4 100644
--- a/src/core/file_sys/romfs.cpp
+++ b/src/core/file_sys/romfs.cpp
@@ -2,6 +2,8 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <memory>
6
5#include "common/common_types.h" 7#include "common/common_types.h"
6#include "common/swap.h" 8#include "common/swap.h"
7#include "core/file_sys/fsmitm_romfsbuild.h" 9#include "core/file_sys/fsmitm_romfsbuild.h"
@@ -12,7 +14,7 @@
12#include "core/file_sys/vfs_vector.h" 14#include "core/file_sys/vfs_vector.h"
13 15
14namespace FileSys { 16namespace FileSys {
15 17namespace {
16constexpr u32 ROMFS_ENTRY_EMPTY = 0xFFFFFFFF; 18constexpr u32 ROMFS_ENTRY_EMPTY = 0xFFFFFFFF;
17 19
18struct TableLocation { 20struct TableLocation {
@@ -51,7 +53,7 @@ struct FileEntry {
51static_assert(sizeof(FileEntry) == 0x20, "FileEntry has incorrect size."); 53static_assert(sizeof(FileEntry) == 0x20, "FileEntry has incorrect size.");
52 54
53template <typename Entry> 55template <typename Entry>
54static std::pair<Entry, std::string> GetEntry(const VirtualFile& file, std::size_t offset) { 56std::pair<Entry, std::string> GetEntry(const VirtualFile& file, std::size_t offset) {
55 Entry entry{}; 57 Entry entry{};
56 if (file->ReadObject(&entry, offset) != sizeof(Entry)) 58 if (file->ReadObject(&entry, offset) != sizeof(Entry))
57 return {}; 59 return {};
@@ -99,6 +101,7 @@ void ProcessDirectory(VirtualFile file, std::size_t dir_offset, std::size_t file
99 this_dir_offset = entry.first.sibling; 101 this_dir_offset = entry.first.sibling;
100 } 102 }
101} 103}
104} // Anonymous namespace
102 105
103VirtualDir ExtractRomFS(VirtualFile file, RomFSExtractionType type) { 106VirtualDir ExtractRomFS(VirtualFile file, RomFSExtractionType type) {
104 RomFSHeader header{}; 107 RomFSHeader header{};