diff --git a/src/citra_qt/game_list_worker.cpp b/src/citra_qt/game_list_worker.cpp index de02e79c0..c00825b9e 100644 --- a/src/citra_qt/game_list_worker.cpp +++ b/src/citra_qt/game_list_worker.cpp @@ -46,15 +46,13 @@ void GameListWorker::AddFstEntriesToGameList(const std::string& dir_path, unsign const bool is_dir = FileUtil::IsDirectory(physical_name); if (!is_dir && HasSupportedFileExtension(physical_name)) { std::unique_ptr loader = Loader::GetLoader(physical_name); - if (!loader) - { + if (!loader) { return true; } bool executable = false; - auto res = loader->IsExecutable(executable); - if (!executable && res != Loader::ResultStatus::ErrorEncrypted) - { + auto res = loader->IsExecutable(executable); + if (!executable && res != Loader::ResultStatus::ErrorEncrypted) { return true; } diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 79ae93130..4c1fdc33d 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -9,9 +9,9 @@ #include #include #include +#include "common/common_paths.h" #include "common/file_util.h" #include "common/logging/log.h" -#include "common/common_paths.h" #include "common/string_util.h" #include "core/core.h" #include "core/file_sys/errors.h" @@ -36,13 +36,13 @@ namespace { bool HasSupportedFileExtension(std::string path) { - static const std::array extensions = {{".3ds", ".3dsx", ".elf", ".axf", - ".cci", ".cxi" ".app" - }}; + static const std::array extensions = {{".3ds", ".3dsx", ".elf", ".axf", ".cci", + ".cxi" + ".app"}}; const auto file_ext = FileUtil::GetExtensionFromFilename(path); return std::find(extensions.begin(), extensions.end(), file_ext) != extensions.end(); } -} +} // namespace namespace Service::AM { @@ -385,32 +385,28 @@ InstallStatus InstallCIA(const std::string& path, LOG_INFO(Service_AM, "Installed {} successfully.", path); - const FileUtil::DirectoryEntryCallable callback = [&callback](u64* num_entries_out, - const std::string& directory, - const std::string& virtual_name) -> bool { + const FileUtil::DirectoryEntryCallable callback = + [&callback](u64* num_entries_out, const std::string& directory, + const std::string& virtual_name) -> bool { const std::string physical_name = directory + DIR_SEP + virtual_name; const bool is_dir = FileUtil::IsDirectory(physical_name); if (!is_dir && HasSupportedFileExtension(physical_name)) { std::unique_ptr loader = Loader::GetLoader(physical_name); - if (!loader) - { - return true; + if (!loader) { + return true; } bool executable = false; - auto res = loader->IsExecutable(executable); - if (res == Loader::ResultStatus::ErrorEncrypted) - { + auto res = loader->IsExecutable(executable); + if (res == Loader::ResultStatus::ErrorEncrypted) { return false; } return true; } else { return FileUtil::ForeachDirectoryEntry(nullptr, physical_name, callback); } - }; - if (!FileUtil::ForeachDirectoryEntry(nullptr, path, callback)) - { + if (!FileUtil::ForeachDirectoryEntry(nullptr, path, callback)) { LOG_ERROR(Service_AM, "CIA {} contained encrypted files.", path); return InstallStatus::ErrorEncrypted; }