summaryrefslogtreecommitdiff
path: root/src/core/file_sys
diff options
context:
space:
mode:
authorGravatar Lioncash2018-08-20 20:24:13 -0400
committerGravatar Lioncash2018-08-20 20:27:00 -0400
commit96463d0a55b11f73417941f2c29ca24f08196878 (patch)
treeea1fb4b71ce40a62213f02a5ddbaa4502bbe54ec /src/core/file_sys
parentMerge pull request #1095 from DarkLordZach/sysarchives (diff)
downloadyuzu-96463d0a55b11f73417941f2c29ca24f08196878.tar.gz
yuzu-96463d0a55b11f73417941f2c29ca24f08196878.tar.xz
yuzu-96463d0a55b11f73417941f2c29ca24f08196878.zip
romfs_factory: Remove unnecessary includes and use forward declarations where applicable
Avoids the need to rebuild whatever includes the romfs factory header if the loader header ever changes. We also don't need to include the main core header. We can instead include the headers we specifically need.
Diffstat (limited to 'src/core/file_sys')
-rw-r--r--src/core/file_sys/nca_metadata.h1
-rw-r--r--src/core/file_sys/romfs_factory.cpp6
-rw-r--r--src/core/file_sys/romfs_factory.h8
3 files changed, 12 insertions, 3 deletions
diff --git a/src/core/file_sys/nca_metadata.h b/src/core/file_sys/nca_metadata.h
index 88e66d4da..ce05b4c1d 100644
--- a/src/core/file_sys/nca_metadata.h
+++ b/src/core/file_sys/nca_metadata.h
@@ -7,6 +7,7 @@
7#include <cstring> 7#include <cstring>
8#include <memory> 8#include <memory>
9#include <vector> 9#include <vector>
10#include "common/common_funcs.h"
10#include "common/common_types.h" 11#include "common/common_types.h"
11#include "common/swap.h" 12#include "common/swap.h"
12#include "core/file_sys/vfs.h" 13#include "core/file_sys/vfs.h"
diff --git a/src/core/file_sys/romfs_factory.cpp b/src/core/file_sys/romfs_factory.cpp
index 1b3824a61..ab67bc749 100644
--- a/src/core/file_sys/romfs_factory.cpp
+++ b/src/core/file_sys/romfs_factory.cpp
@@ -6,15 +6,17 @@
6#include <memory> 6#include <memory>
7#include "common/common_types.h" 7#include "common/common_types.h"
8#include "common/logging/log.h" 8#include "common/logging/log.h"
9#include "core/core.h" 9#include "core/file_sys/nca_metadata.h"
10#include "core/file_sys/romfs_factory.h" 10#include "core/file_sys/romfs_factory.h"
11#include "core/hle/kernel/process.h" 11#include "core/hle/kernel/process.h"
12#include "core/hle/service/filesystem/filesystem.h"
13#include "core/loader/loader.h"
12 14
13namespace FileSys { 15namespace FileSys {
14 16
15RomFSFactory::RomFSFactory(Loader::AppLoader& app_loader) { 17RomFSFactory::RomFSFactory(Loader::AppLoader& app_loader) {
16 // Load the RomFS from the app 18 // Load the RomFS from the app
17 if (Loader::ResultStatus::Success != app_loader.ReadRomFS(file)) { 19 if (app_loader.ReadRomFS(file) != Loader::ResultStatus::Success) {
18 LOG_ERROR(Service_FS, "Unable to read RomFS!"); 20 LOG_ERROR(Service_FS, "Unable to read RomFS!");
19 } 21 }
20} 22}
diff --git a/src/core/file_sys/romfs_factory.h b/src/core/file_sys/romfs_factory.h
index 455cd4159..f38ddc4f7 100644
--- a/src/core/file_sys/romfs_factory.h
+++ b/src/core/file_sys/romfs_factory.h
@@ -6,11 +6,17 @@
6 6
7#include <memory> 7#include <memory>
8#include "common/common_types.h" 8#include "common/common_types.h"
9#include "core/file_sys/vfs.h"
9#include "core/hle/result.h" 10#include "core/hle/result.h"
10#include "core/loader/loader.h" 11
12namespace Loader {
13class AppLoader;
14} // namespace Loader
11 15
12namespace FileSys { 16namespace FileSys {
13 17
18enum class ContentRecordType : u8;
19
14enum class StorageId : u8 { 20enum class StorageId : u8 {
15 None = 0, 21 None = 0,
16 Host = 1, 22 Host = 1,