diff --git a/src/core/importer.cpp b/src/core/importer.cpp index 758ab5c..be155aa 100644 --- a/src/core/importer.cpp +++ b/src/core/importer.cpp @@ -404,7 +404,7 @@ static std::string FindTMD(const std::string& path) { } bool SDMCImporter::LoadTMD(ContentType type, u64 id, TitleMetadata& out) const { - const bool is_nand = IsNandTitle(type); + const bool is_nand = type == ContentType::NandTitle; auto& title_db = is_nand ? nand_title_db : sdmc_title_db; const auto physical_path = @@ -443,7 +443,7 @@ bool SDMCImporter::LoadTMD(const ContentSpecifier& specifier, TitleMetadata& out std::shared_ptr SDMCImporter::OpenContent(const ContentSpecifier& specifier, u32 content_id) const { - if (IsNandTitle(specifier.type)) { + if (specifier.type == ContentType::NandTitle) { const auto path = fmt::format("{}{:08x}/{:08x}/content/{:08x}.app", config.system_titles_path, (specifier.id >> 32), (specifier.id & 0xFFFFFFFF), content_id); diff --git a/src/core/importer.h b/src/core/importer.h index 79cbcec..5670ba6 100644 --- a/src/core/importer.h +++ b/src/core/importer.h @@ -39,9 +39,6 @@ constexpr std::size_t ContentTypeCount = 7; constexpr bool IsTitle(ContentType type) { return type == ContentType::Title || type == ContentType::NandTitle; } -constexpr bool IsNandTitle(ContentType type) { - return type == ContentType::NandTitle; -} /** * Struct that specifies an importable content. diff --git a/src/frontend/import_dialog.cpp b/src/frontend/import_dialog.cpp index 4ca385d..6df0b6f 100644 --- a/src/frontend/import_dialog.cpp +++ b/src/frontend/import_dialog.cpp @@ -831,7 +831,7 @@ void ImportDialog::StartBatchDumpingCXI() { void ImportDialog::StartBuildingCIASingle(const Core::ContentSpecifier& specifier) { CIABuildDialog dialog(this, /*is_dir*/ false, - /*is_nand*/ Core::IsNandTitle(specifier.type), + /*is_nand*/ specifier.type == Core::ContentType::NandTitle, /*enable_legit*/ importer->CanBuildLegitCIA(specifier), last_build_cia_path); if (dialog.exec() != QDialog::Accepted) { @@ -875,9 +875,10 @@ void ImportDialog::StartBatchBuildingCIA() { to_import.erase(removed_iter, to_import.end()); - const bool is_nand = std::all_of( - to_import.begin(), to_import.end(), - [](const Core::ContentSpecifier& specifier) { return Core::IsNandTitle(specifier.type); }); + const bool is_nand = std::all_of(to_import.begin(), to_import.end(), + [](const Core::ContentSpecifier& specifier) { + return specifier.type == Core::ContentType::NandTitle; + }); const bool enable_legit = std::all_of(to_import.begin(), to_import.end(), [this](const Core::ContentSpecifier& specifier) { return importer->CanBuildLegitCIA(specifier);