summaryrefslogtreecommitdiff
path: root/src/core/loader/ncch.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2014-06-19 17:46:05 -0400
committerGravatar bunnei2014-06-24 19:30:06 -0400
commit62b444cd17c17e6f8009d87609b620bcb51b43bd (patch)
treec99a07441b97232f8f90f9ec06a0291a1ce5c396 /src/core/loader/ncch.cpp
parentNCCH: Added RomFS loading. (diff)
downloadyuzu-62b444cd17c17e6f8009d87609b620bcb51b43bd.tar.gz
yuzu-62b444cd17c17e6f8009d87609b620bcb51b43bd.tar.xz
yuzu-62b444cd17c17e6f8009d87609b620bcb51b43bd.zip
Loader: Refactored use of const.
Diffstat (limited to 'src/core/loader/ncch.cpp')
-rw-r--r--src/core/loader/ncch.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/loader/ncch.cpp b/src/core/loader/ncch.cpp
index 6423da8f9..a4922c2c0 100644
--- a/src/core/loader/ncch.cpp
+++ b/src/core/loader/ncch.cpp
@@ -102,7 +102,7 @@ bool LZSS_Decompress(u8* compressed, u32 compressed_size, u8* decompressed, u32
102// AppLoader_NCCH class 102// AppLoader_NCCH class
103 103
104/// AppLoader_NCCH constructor 104/// AppLoader_NCCH constructor
105AppLoader_NCCH::AppLoader_NCCH(std::string& filename) { 105AppLoader_NCCH::AppLoader_NCCH(const std::string& filename) {
106 this->filename = filename; 106 this->filename = filename;
107 is_loaded = false; 107 is_loaded = false;
108 is_compressed = false; 108 is_compressed = false;
@@ -119,7 +119,7 @@ AppLoader_NCCH::~AppLoader_NCCH() {
119 * Loads .code section into memory for booting 119 * Loads .code section into memory for booting
120 * @return ResultStatus result of function 120 * @return ResultStatus result of function
121 */ 121 */
122const ResultStatus AppLoader_NCCH::LoadExec() const { 122ResultStatus AppLoader_NCCH::LoadExec() const {
123 if (!is_loaded) 123 if (!is_loaded)
124 return ResultStatus::ErrorNotLoaded; 124 return ResultStatus::ErrorNotLoaded;
125 125
@@ -137,7 +137,7 @@ const ResultStatus AppLoader_NCCH::LoadExec() const {
137 * @param name Name of section to read out of NCCH file 137 * @param name Name of section to read out of NCCH file
138 * @param buffer Buffer to read section into. 138 * @param buffer Buffer to read section into.
139 */ 139 */
140const ResultStatus AppLoader_NCCH::LoadSectionExeFS(File::IOFile& file, const char* name, 140ResultStatus AppLoader_NCCH::LoadSectionExeFS(File::IOFile& file, const char* name,
141 std::vector<u8>& buffer) { 141 std::vector<u8>& buffer) {
142 142
143 // Iterate through the ExeFs archive until we find the .code file... 143 // Iterate through the ExeFs archive until we find the .code file...
@@ -183,7 +183,7 @@ const ResultStatus AppLoader_NCCH::LoadSectionExeFS(File::IOFile& file, const ch
183 * @param file Handle to file to read from 183 * @param file Handle to file to read from
184 * @return ResultStatus result of function 184 * @return ResultStatus result of function
185 */ 185 */
186const ResultStatus AppLoader_NCCH::LoadRomFS(File::IOFile& file) { 186ResultStatus AppLoader_NCCH::LoadRomFS(File::IOFile& file) {
187 // Check if the NCCH has a RomFS... 187 // Check if the NCCH has a RomFS...
188 if (ncch_header.romfs_offset != 0 && ncch_header.romfs_size != 0) { 188 if (ncch_header.romfs_offset != 0 && ncch_header.romfs_size != 0) {
189 u32 romfs_offset = ncch_offset + (ncch_header.romfs_offset * kBlockSize) + 0x1000; 189 u32 romfs_offset = ncch_offset + (ncch_header.romfs_offset * kBlockSize) + 0x1000;
@@ -210,7 +210,7 @@ const ResultStatus AppLoader_NCCH::LoadRomFS(File::IOFile& file) {
210 * @todo Move NCSD parsing out of here and create a separate function for loading these 210 * @todo Move NCSD parsing out of here and create a separate function for loading these
211 * @return True on success, otherwise false 211 * @return True on success, otherwise false
212 */ 212 */
213const ResultStatus AppLoader_NCCH::Load() { 213ResultStatus AppLoader_NCCH::Load() {
214 INFO_LOG(LOADER, "Loading NCCH file %s...", filename.c_str()); 214 INFO_LOG(LOADER, "Loading NCCH file %s...", filename.c_str());
215 215
216 if (is_loaded) 216 if (is_loaded)