summaryrefslogtreecommitdiff
path: root/src/core/loader/ncch.h
diff options
context:
space:
mode:
authorGravatar Emmanuel Gil Peyrot2015-01-06 21:30:40 +0000
committerGravatar Emmanuel Gil Peyrot2015-01-15 21:21:26 +0000
commitb5237e885df72f6c37532fc8af9573966e7b07e5 (patch)
treefdfd4da299cc2779f35fcc30e770b85b9e710166 /src/core/loader/ncch.h
parentLoader: Initialize the default NCCH values in the class declaration, not in t... (diff)
downloadyuzu-b5237e885df72f6c37532fc8af9573966e7b07e5.tar.gz
yuzu-b5237e885df72f6c37532fc8af9573966e7b07e5.tar.xz
yuzu-b5237e885df72f6c37532fc8af9573966e7b07e5.zip
Loader: Keep a reference to the file and pass it to the correct AppLoader, instead of loading it multiple times.
Diffstat (limited to 'src/core/loader/ncch.h')
-rw-r--r--src/core/loader/ncch.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/core/loader/ncch.h b/src/core/loader/ncch.h
index 578513f77..d9d68f154 100644
--- a/src/core/loader/ncch.h
+++ b/src/core/loader/ncch.h
@@ -5,7 +5,6 @@
5#pragma once 5#pragma once
6 6
7#include "common/common.h" 7#include "common/common.h"
8#include "common/file_util.h"
9 8
10#include "core/loader/loader.h" 9#include "core/loader/loader.h"
11 10
@@ -147,8 +146,7 @@ namespace Loader {
147/// Loads an NCCH file (e.g. from a CCI, or the first NCCH in a CXI) 146/// Loads an NCCH file (e.g. from a CCI, or the first NCCH in a CXI)
148class AppLoader_NCCH final : public AppLoader { 147class AppLoader_NCCH final : public AppLoader {
149public: 148public:
150 AppLoader_NCCH(const std::string& filename); 149 AppLoader_NCCH(std::unique_ptr<FileUtil::IOFile>&& file) : AppLoader(std::move(file)) { }
151 ~AppLoader_NCCH() override;
152 150
153 /** 151 /**
154 * Load the application 152 * Load the application
@@ -213,9 +211,6 @@ private:
213 */ 211 */
214 ResultStatus LoadExec() const; 212 ResultStatus LoadExec() const;
215 213
216 std::string filename;
217
218 bool is_loaded = false;
219 bool is_compressed = false; 214 bool is_compressed = false;
220 215
221 u32 entry_point = 0; 216 u32 entry_point = 0;