Make the arrays const

This commit is contained in:
zhupengfei 2020-02-29 09:11:34 +08:00
parent 9d57325a8b
commit 0fe832bb49
No known key found for this signature in database
GPG key ID: DD129E108BD09378

View file

@ -315,7 +315,7 @@ Loader::ResultStatus NCCHContainer::Load() {
const auto mods_path = const auto mods_path =
fmt::format("{}mods/{:016X}/", FileUtil::GetUserPath(FileUtil::UserPath::LoadDir), fmt::format("{}mods/{:016X}/", FileUtil::GetUserPath(FileUtil::UserPath::LoadDir),
GetModId(ncch_header.program_id)); GetModId(ncch_header.program_id));
std::array<std::string, 2> exheader_override_paths{{ const std::array<std::string, 2> exheader_override_paths{{
mods_path + "exheader.bin", mods_path + "exheader.bin",
filepath + ".exheader", filepath + ".exheader",
}}; }};
@ -585,7 +585,7 @@ Loader::ResultStatus NCCHContainer::LoadOverrideExeFSSection(const char* name,
const auto mods_path = const auto mods_path =
fmt::format("{}mods/{:016X}/", FileUtil::GetUserPath(FileUtil::UserPath::LoadDir), fmt::format("{}mods/{:016X}/", FileUtil::GetUserPath(FileUtil::UserPath::LoadDir),
GetModId(ncch_header.program_id)); GetModId(ncch_header.program_id));
std::array<std::string, 3> override_paths{{ const std::array<std::string, 3> override_paths{{
mods_path + "exefs/" + override_name, mods_path + "exefs/" + override_name,
mods_path + override_name, mods_path + override_name,
filepath + ".exefsdir/" + override_name, filepath + ".exefsdir/" + override_name,