summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorScott Mansell <phiren@gmail.com>2026-07-23 09:27:47 +1200
committerGitHub <noreply@github.com>2026-07-23 09:27:47 +1200
commit03e409a3e10d67287b81c7c937657b6d2a0c39a0 (patch)
treecc3016ac27bd645eb1aa68db25fd9f72037e3b90 /Source/Core
parentb008142f72a099a9bcb971776209504f085ae0be (diff)
parent2ca2a5c8750b43fcd590fb9d9f9609cf0ab65f51 (diff)
Merge pull request #14749 from tygyh/Replace-conditions-with-regex
UICommon: Replace `find != std::npos` with `contains`
Diffstat (limited to 'Source/Core')
-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 bc623a8410..818cf2b766 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));