summaryrefslogtreecommitdiff
path: root/Source/Core/UICommon/GameFile.cpp
diff options
context:
space:
mode:
authorDr. Dystopia <jonis9898@hotmail.com>2026-07-22 08:38:12 +0200
committerDr. Dystopia <jonis9898@hotmail.com>2026-07-22 12:15:55 +0200
commit2ca2a5c8750b43fcd590fb9d9f9609cf0ab65f51 (patch)
tree2479265feaa2482c07d063b00969d85f411a46ea /Source/Core/UICommon/GameFile.cpp
parentb6d8bc299ee7d03496d624b2e6b9a18d70522435 (diff)
UICommon: Replace `find != std::npos` with `contains`
Diffstat (limited to 'Source/Core/UICommon/GameFile.cpp')
-rw-r--r--Source/Core/UICommon/GameFile.cpp7
1 files 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));