summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/VolumeVerifier.cpp
diff options
context:
space:
mode:
authorLioncash <mai.iam2048@gmail.com>2023-01-24 14:25:49 -0500
committerLioncash <mai.iam2048@gmail.com>2023-01-24 14:58:20 -0500
commite5b91f00b0688d5cba6870da6d6ad3300097b07f (patch)
tree09ec8ac31ff935d63aa9c06004802156ac96ebf5 /Source/Core/DiscIO/VolumeVerifier.cpp
parentba6ee9d7ba9730e5b2165ff0ee18cbc23762b129 (diff)
Common: Replace StringBeginsWith/StringEndsWith with std equivalents
Obsoletes these functions in favor of the standard member functions added in C++20.
Diffstat (limited to 'Source/Core/DiscIO/VolumeVerifier.cpp')
-rw-r--r--Source/Core/DiscIO/VolumeVerifier.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/Core/DiscIO/VolumeVerifier.cpp b/Source/Core/DiscIO/VolumeVerifier.cpp
index c6392d446b..855142143f 100644
--- a/Source/Core/DiscIO/VolumeVerifier.cpp
+++ b/Source/Core/DiscIO/VolumeVerifier.cpp
@@ -247,7 +247,7 @@ std::vector<RedumpVerifier::PotentialMatch> RedumpVerifier::ScanDatfile(const st
if (version % 0x30 != m_revision % 0x30)
continue;
- if (serials.empty() || StringBeginsWith(serials, "DS"))
+ if (serials.empty() || serials.starts_with("DS"))
{
// GC Datel discs have no serials in Redump, Wii Datel discs have serials like "DS000101"
if (!m_game_id.empty())
@@ -666,7 +666,7 @@ bool VolumeVerifier::CheckPartition(const Partition& partition)
{
std::string file_name = f.GetName();
Common::ToLower(&file_name);
- if (StringBeginsWith(file_name, correct_ios))
+ if (file_name.starts_with(correct_ios))
{
has_correct_ios = true;
break;
@@ -865,13 +865,13 @@ void VolumeVerifier::CheckMisc()
bool inconsistent_game_id = true;
if (game_id_encrypted == "RELSAB")
{
- if (StringBeginsWith(game_id_unencrypted, "410"))
+ if (game_id_unencrypted.starts_with("410"))
{
// This is the Wii Backup Disc (aka "pinkfish" disc),
// which legitimately has an inconsistent game ID.
inconsistent_game_id = false;
}
- else if (StringBeginsWith(game_id_unencrypted, "010"))
+ else if (game_id_unencrypted.starts_with("010"))
{
// Hacked version of the Wii Backup Disc (aka "pinkfish" disc).
std::string proper_game_id = game_id_unencrypted;
@@ -1016,7 +1016,7 @@ void VolumeVerifier::CheckMisc()
"though the files are not identical."));
}
- if (IsDisc(m_volume.GetVolumeType()) && StringBeginsWith(game_id_unencrypted, "R8P"))
+ if (IsDisc(m_volume.GetVolumeType()) && game_id_unencrypted.starts_with("R8P"))
CheckSuperPaperMario();
}