yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

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.
This commit is contained in:
Lioncash 2018-08-20 20:24:13 -04:00
parent dd70ddad7e
commit 96463d0a55
3 changed files with 12 additions and 3 deletions

View File

@ -7,6 +7,7 @@
#include <cstring> #include <cstring>
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "common/common_funcs.h"
#include "common/common_types.h" #include "common/common_types.h"
#include "common/swap.h" #include "common/swap.h"
#include "core/file_sys/vfs.h" #include "core/file_sys/vfs.h"

View File

@ -6,15 +6,17 @@
#include <memory> #include <memory>
#include "common/common_types.h" #include "common/common_types.h"
#include "common/logging/log.h" #include "common/logging/log.h"
#include "core/core.h" #include "core/file_sys/nca_metadata.h"
#include "core/file_sys/romfs_factory.h" #include "core/file_sys/romfs_factory.h"
#include "core/hle/kernel/process.h" #include "core/hle/kernel/process.h"
#include "core/hle/service/filesystem/filesystem.h"
#include "core/loader/loader.h"
namespace FileSys { namespace FileSys {
RomFSFactory::RomFSFactory(Loader::AppLoader& app_loader) { RomFSFactory::RomFSFactory(Loader::AppLoader& app_loader) {
// Load the RomFS from the app // Load the RomFS from the app
if (Loader::ResultStatus::Success != app_loader.ReadRomFS(file)) { if (app_loader.ReadRomFS(file) != Loader::ResultStatus::Success) {
LOG_ERROR(Service_FS, "Unable to read RomFS!"); LOG_ERROR(Service_FS, "Unable to read RomFS!");
} }
} }

View File

@ -6,11 +6,17 @@
#include <memory> #include <memory>
#include "common/common_types.h" #include "common/common_types.h"
#include "core/file_sys/vfs.h"
#include "core/hle/result.h" #include "core/hle/result.h"
#include "core/loader/loader.h"
namespace Loader {
class AppLoader;
} // namespace Loader
namespace FileSys { namespace FileSys {
enum class ContentRecordType : u8;
enum class StorageId : u8 { enum class StorageId : u8 {
None = 0, None = 0,
Host = 1, Host = 1,