summaryrefslogtreecommitdiff
path: root/src/core/loader
diff options
context:
space:
mode:
authorGravatar Lioncash2018-08-14 22:37:12 -0400
committerGravatar Lioncash2018-08-15 01:41:40 -0400
commit0769aa594e8814ffd7e70654cfd1bdc04ba0c5c4 (patch)
tree7e151b31e50e2b73133674984f537f7d3cc4e5ab /src/core/loader
parentloader/xci: Remove unnecessary includes and member variables (diff)
downloadyuzu-0769aa594e8814ffd7e70654cfd1bdc04ba0c5c4.tar.gz
yuzu-0769aa594e8814ffd7e70654cfd1bdc04ba0c5c4.tar.xz
yuzu-0769aa594e8814ffd7e70654cfd1bdc04ba0c5c4.zip
loader/nca: Remove unnecessary includes and member variables
Diffstat (limited to 'src/core/loader')
-rw-r--r--src/core/loader/nca.cpp14
-rw-r--r--src/core/loader/nca.h17
2 files changed, 11 insertions, 20 deletions
diff --git a/src/core/loader/nca.cpp b/src/core/loader/nca.cpp
index 8498cc94b..9d50c7d42 100644
--- a/src/core/loader/nca.cpp
+++ b/src/core/loader/nca.cpp
@@ -3,28 +3,22 @@
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include <utility> 5#include <utility>
6#include <vector>
7 6
8#include "common/file_util.h" 7#include "common/file_util.h"
9#include "common/logging/log.h" 8#include "common/logging/log.h"
10#include "common/string_util.h"
11#include "common/swap.h"
12#include "core/core.h"
13#include "core/file_sys/content_archive.h" 9#include "core/file_sys/content_archive.h"
14#include "core/file_sys/program_metadata.h"
15#include "core/gdbstub/gdbstub.h"
16#include "core/hle/kernel/process.h" 10#include "core/hle/kernel/process.h"
17#include "core/hle/kernel/resource_limit.h"
18#include "core/hle/service/filesystem/filesystem.h" 11#include "core/hle/service/filesystem/filesystem.h"
12#include "core/loader/deconstructed_rom_directory.h"
19#include "core/loader/nca.h" 13#include "core/loader/nca.h"
20#include "core/loader/nso.h"
21#include "core/memory.h"
22 14
23namespace Loader { 15namespace Loader {
24 16
25AppLoader_NCA::AppLoader_NCA(FileSys::VirtualFile file_) 17AppLoader_NCA::AppLoader_NCA(FileSys::VirtualFile file_)
26 : AppLoader(std::move(file_)), nca(std::make_unique<FileSys::NCA>(file)) {} 18 : AppLoader(std::move(file_)), nca(std::make_unique<FileSys::NCA>(file)) {}
27 19
20AppLoader_NCA::~AppLoader_NCA() = default;
21
28FileType AppLoader_NCA::IdentifyType(const FileSys::VirtualFile& file) { 22FileType AppLoader_NCA::IdentifyType(const FileSys::VirtualFile& file) {
29 FileSys::NCA nca(file); 23 FileSys::NCA nca(file);
30 24
@@ -83,6 +77,4 @@ ResultStatus AppLoader_NCA::ReadProgramId(u64& out_program_id) {
83 return ResultStatus::Success; 77 return ResultStatus::Success;
84} 78}
85 79
86AppLoader_NCA::~AppLoader_NCA() = default;
87
88} // namespace Loader 80} // namespace Loader
diff --git a/src/core/loader/nca.h b/src/core/loader/nca.h
index 7f7d8ea0b..326f84857 100644
--- a/src/core/loader/nca.h
+++ b/src/core/loader/nca.h
@@ -4,20 +4,24 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <string>
8#include "common/common_types.h" 7#include "common/common_types.h"
9#include "core/file_sys/content_archive.h" 8#include "core/file_sys/vfs.h"
10#include "core/file_sys/program_metadata.h"
11#include "core/hle/kernel/object.h" 9#include "core/hle/kernel/object.h"
12#include "core/loader/loader.h" 10#include "core/loader/loader.h"
13#include "deconstructed_rom_directory.h" 11
12namespace FileSys {
13class NCA;
14}
14 15
15namespace Loader { 16namespace Loader {
16 17
18class AppLoader_DeconstructedRomDirectory;
19
17/// Loads an NCA file 20/// Loads an NCA file
18class AppLoader_NCA final : public AppLoader { 21class AppLoader_NCA final : public AppLoader {
19public: 22public:
20 explicit AppLoader_NCA(FileSys::VirtualFile file); 23 explicit AppLoader_NCA(FileSys::VirtualFile file);
24 ~AppLoader_NCA() override;
21 25
22 /** 26 /**
23 * Returns the type of the file 27 * Returns the type of the file
@@ -35,12 +39,7 @@ public:
35 ResultStatus ReadRomFS(FileSys::VirtualFile& dir) override; 39 ResultStatus ReadRomFS(FileSys::VirtualFile& dir) override;
36 ResultStatus ReadProgramId(u64& out_program_id) override; 40 ResultStatus ReadProgramId(u64& out_program_id) override;
37 41
38 ~AppLoader_NCA();
39
40private: 42private:
41 FileSys::ProgramMetadata metadata;
42
43 FileSys::NCAHeader header;
44 std::unique_ptr<FileSys::NCA> nca; 43 std::unique_ptr<FileSys::NCA> nca;
45 std::unique_ptr<AppLoader_DeconstructedRomDirectory> directory_loader; 44 std::unique_ptr<AppLoader_DeconstructedRomDirectory> directory_loader;
46}; 45};