mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-15 12:52:53 +00:00
filesys/romfs: Make ProcessFile and ProcessDirectory internally linked
These functions aren't used outside of this file, so we can place them within an anonymous namespace.
This commit is contained in:
parent
31daaa7911
commit
ba3c55ab7b
|
@ -12,7 +12,7 @@
|
||||||
#include "core/file_sys/vfs_vector.h"
|
#include "core/file_sys/vfs_vector.h"
|
||||||
|
|
||||||
namespace FileSys {
|
namespace FileSys {
|
||||||
|
namespace {
|
||||||
constexpr u32 ROMFS_ENTRY_EMPTY = 0xFFFFFFFF;
|
constexpr u32 ROMFS_ENTRY_EMPTY = 0xFFFFFFFF;
|
||||||
|
|
||||||
struct TableLocation {
|
struct TableLocation {
|
||||||
|
@ -51,7 +51,7 @@ struct FileEntry {
|
||||||
static_assert(sizeof(FileEntry) == 0x20, "FileEntry has incorrect size.");
|
static_assert(sizeof(FileEntry) == 0x20, "FileEntry has incorrect size.");
|
||||||
|
|
||||||
template <typename Entry>
|
template <typename Entry>
|
||||||
static std::pair<Entry, std::string> GetEntry(const VirtualFile& file, std::size_t offset) {
|
std::pair<Entry, std::string> GetEntry(const VirtualFile& file, std::size_t offset) {
|
||||||
Entry entry{};
|
Entry entry{};
|
||||||
if (file->ReadObject(&entry, offset) != sizeof(Entry))
|
if (file->ReadObject(&entry, offset) != sizeof(Entry))
|
||||||
return {};
|
return {};
|
||||||
|
@ -99,6 +99,7 @@ void ProcessDirectory(VirtualFile file, std::size_t dir_offset, std::size_t file
|
||||||
this_dir_offset = entry.first.sibling;
|
this_dir_offset = entry.first.sibling;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} // Anonymous namespace
|
||||||
|
|
||||||
VirtualDir ExtractRomFS(VirtualFile file, RomFSExtractionType type) {
|
VirtualDir ExtractRomFS(VirtualFile file, RomFSExtractionType type) {
|
||||||
RomFSHeader header{};
|
RomFSHeader header{};
|
||||||
|
|
Loading…
Reference in a new issue