diff --git a/src/citra_qt/game_list_worker.cpp b/src/citra_qt/game_list_worker.cpp index c00825b9e7..f032446376 100644 --- a/src/citra_qt/game_list_worker.cpp +++ b/src/citra_qt/game_list_worker.cpp @@ -51,7 +51,7 @@ void GameListWorker::AddFstEntriesToGameList(const std::string& dir_path, unsign } bool executable = false; - auto res = loader->IsExecutable(executable); + const auto res = loader->IsExecutable(executable); if (!executable && res != Loader::ResultStatus::ErrorEncrypted) { return true; } diff --git a/src/core/file_sys/ncch_container.cpp b/src/core/file_sys/ncch_container.cpp index bb972c4318..cb8a2d5130 100644 --- a/src/core/file_sys/ncch_container.cpp +++ b/src/core/file_sys/ncch_container.cpp @@ -134,8 +134,9 @@ Loader::ResultStatus NCCHContainer::OpenFile(const std::string& filepath, u32 nc } Loader::ResultStatus NCCHContainer::LoadHeader() { - if (has_header) + if (has_header) { return Loader::ResultStatus::Success; + } if (!file.IsOpen()) { return Loader::ResultStatus::Error; } @@ -143,8 +144,9 @@ Loader::ResultStatus NCCHContainer::LoadHeader() { // Reset read pointer in case this file has been read before. file.Seek(ncch_offset, SEEK_SET); - if (file.ReadBytes(&ncch_header, sizeof(NCCH_Header)) != sizeof(NCCH_Header)) + if (file.ReadBytes(&ncch_header, sizeof(NCCH_Header)) != sizeof(NCCH_Header)) { return Loader::ResultStatus::Error; + } // Skip NCSD header and load first NCCH (NCSD is just a container of NCCH files)... if (Loader::MakeMagic('N', 'C', 'S', 'D') == ncch_header.magic) { @@ -155,8 +157,9 @@ Loader::ResultStatus NCCHContainer::LoadHeader() { } // Verify we are loading the correct file type... - if (Loader::MakeMagic('N', 'C', 'C', 'H') != ncch_header.magic) + if (Loader::MakeMagic('N', 'C', 'C', 'H') != ncch_header.magic) { return Loader::ResultStatus::ErrorInvalidFormat; + } has_header = true; return Loader::ResultStatus::Success; diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index f3d7ea985a..44bdfc8a20 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -396,7 +396,7 @@ InstallStatus InstallCIA(const std::string& path, } bool executable = false; - auto res = loader->IsExecutable(executable); + const auto res = loader->IsExecutable(executable); if (res == Loader::ResultStatus::ErrorEncrypted) { return false; }