summaryrefslogtreecommitdiff
path: root/src/core/loader/nax.h
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-09-19 14:13:00 -0400
committerLioncash <mathew1800@gmail.com>2018-09-19 14:22:37 -0400
commit45195a51a76b3000e028234f619a4d15bff443eb (patch)
tree5261c2ea094b4022505cd8e6f64911f877304ebd /src/core/loader/nax.h
parentc8c410565927b54b2a1353ca00a1c4de38a74816 (diff)
nax: Avoid re-parsing NAX data with GetFileType()
An instance of the NAX apploader already has an existing NAX instance in memory. Calling directly into IdentifyType() directly would re-parse the whole file again into yet another NAX instance, only to toss it away again. This gets rid of unnecessary/redundant file parsing and allocations.
Diffstat (limited to 'src/core/loader/nax.h')
-rw-r--r--src/core/loader/nax.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/core/loader/nax.h b/src/core/loader/nax.h
index 4dbae2918..56605fe45 100644
--- a/src/core/loader/nax.h
+++ b/src/core/loader/nax.h
@@ -31,9 +31,7 @@ public:
*/
static FileType IdentifyType(const FileSys::VirtualFile& file);
- FileType GetFileType() override {
- return IdentifyType(file);
- }
+ FileType GetFileType() override;
ResultStatus Load(Kernel::SharedPtr<Kernel::Process>& process) override;