From 2c62d9255160b7302942d536c9c990b86c7fb907 Mon Sep 17 00:00:00 2001 From: bunnei Date: Fri, 4 Jul 2014 13:11:09 -0400 Subject: Loader: Updated read methods to be const - Required "file" handle to be made local and explicitly opened/closed as needed --- src/core/loader/ncch.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/core/loader/ncch.h') diff --git a/src/core/loader/ncch.h b/src/core/loader/ncch.h index 99753b24..c9a35228 100644 --- a/src/core/loader/ncch.h +++ b/src/core/loader/ncch.h @@ -161,35 +161,35 @@ public: * @param buffer Reference to buffer to store data * @return ResultStatus result of function */ - ResultStatus ReadCode(std::vector& buffer); + ResultStatus ReadCode(std::vector& buffer) const; /** * Get the icon (typically icon section) of the application * @param buffer Reference to buffer to store data * @return ResultStatus result of function */ - ResultStatus ReadIcon(std::vector& buffer); + ResultStatus ReadIcon(std::vector& buffer) const; /** * Get the banner (typically banner section) of the application * @param buffer Reference to buffer to store data * @return ResultStatus result of function */ - ResultStatus ReadBanner(std::vector& buffer); + ResultStatus ReadBanner(std::vector& buffer) const; /** * Get the logo (typically logo section) of the application * @param buffer Reference to buffer to store data * @return ResultStatus result of function */ - ResultStatus ReadLogo(std::vector& buffer); + ResultStatus ReadLogo(std::vector& buffer) const; /** * Get the RomFS of the application * @param buffer Reference to buffer to store data * @return ResultStatus result of function */ - ResultStatus ReadRomFS(std::vector& buffer); + ResultStatus ReadRomFS(std::vector& buffer) const; private: @@ -199,15 +199,14 @@ private: * @param buffer Vector to read data into * @return ResultStatus result of function */ - ResultStatus LoadSectionExeFS(const char* name, std::vector& buffer); + ResultStatus LoadSectionExeFS(const char* name, std::vector& buffer) const; /** * Loads .code section into memory for booting * @return ResultStatus result of function */ - ResultStatus LoadExec(); + ResultStatus LoadExec() const; - File::IOFile file; std::string filename; bool is_loaded; -- cgit v1.2.3