From 45195a51a76b3000e028234f619a4d15bff443eb Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 19 Sep 2018 14:13:00 -0400 Subject: 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. --- src/core/loader/nax.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/core/loader/nax.h') 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& process) override; -- cgit v1.2.3