From 2ca2a5c8750b43fcd590fb9d9f9609cf0ab65f51 Mon Sep 17 00:00:00 2001 From: "Dr. Dystopia" Date: Wed, 22 Jul 2026 08:38:12 +0200 Subject: [PATCH] UICommon: Replace `find != std::npos` with `contains` --- Source/Core/UICommon/GameFile.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/Core/UICommon/GameFile.cpp b/Source/Core/UICommon/GameFile.cpp index 4acab314d1..5385d75e7b 100644 --- a/Source/Core/UICommon/GameFile.cpp +++ b/Source/Core/UICommon/GameFile.cpp @@ -630,9 +630,10 @@ std::string GameFile::GetNetPlayName(const Core::TitleDatabase& title_database) std::string lower_name = name; Common::ToLower(&lower_name); - if (disc_number > 1 && - lower_name.find(fmt::format("disc {}", disc_number)) == std::string::npos && - lower_name.find(fmt::format("disc{}", disc_number)) == std::string::npos) + auto is_numbered_disc = lower_name.contains(fmt::format("disc {}", disc_number)) || + lower_name.contains(fmt::format("disc{}", disc_number)); + + if (disc_number > 1 && !is_numbered_disc) { std::string disc_text = "Disc "; info.push_back(disc_text + std::to_string(disc_number));