From 023aef053c96c92c9ea15d067f7d2cb7150585d6 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sat, 20 Jan 2018 14:55:54 -0500 Subject: loader: Refactor to also pass filepath into IdentifyType. --- src/core/loader/elf.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core/loader/elf.h') diff --git a/src/core/loader/elf.h b/src/core/loader/elf.h index 113da5917..a5158338f 100644 --- a/src/core/loader/elf.h +++ b/src/core/loader/elf.h @@ -22,12 +22,13 @@ public: /** * Returns the type of the file * @param file FileUtil::IOFile open file + * @param filepath Path of the file that we are opening. * @return FileType found, or FileType::Error if this loader doesn't know it */ - static FileType IdentifyType(FileUtil::IOFile& file); + static FileType IdentifyType(FileUtil::IOFile& file, const std::string& filepath); FileType GetFileType() override { - return IdentifyType(file); + return IdentifyType(file, filename); } ResultStatus Load(Kernel::SharedPtr& process) override; -- cgit v1.2.3 From 386df282a3ad340ddaf7ab054102858406b27198 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sat, 20 Jan 2018 15:48:37 -0500 Subject: loader: Clean up ctors and includes. --- src/core/loader/elf.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core/loader/elf.h') diff --git a/src/core/loader/elf.h b/src/core/loader/elf.h index a5158338f..ee741a789 100644 --- a/src/core/loader/elf.h +++ b/src/core/loader/elf.h @@ -16,8 +16,7 @@ namespace Loader { /// Loads an ELF/AXF file class AppLoader_ELF final : public AppLoader { public: - AppLoader_ELF(FileUtil::IOFile&& file, std::string filename) - : AppLoader(std::move(file)), filename(std::move(filename)) {} + AppLoader_ELF(FileUtil::IOFile&& file, std::string filename); /** * Returns the type of the file -- cgit v1.2.3