From 982893b04cb3605f7703ebf2b9a99d33efa3b3eb Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Sun, 21 Jul 2024 16:26:35 +0100 Subject: Use C++20 erase_if() instead of erase(remove_if()) (NFC) --- Source/Core/DiscIO/DiscUtils.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'Source/Core/DiscIO/DiscUtils.cpp') diff --git a/Source/Core/DiscIO/DiscUtils.cpp b/Source/Core/DiscIO/DiscUtils.cpp index cdfcb015c4..afd22117c6 100644 --- a/Source/Core/DiscIO/DiscUtils.cpp +++ b/Source/Core/DiscIO/DiscUtils.cpp @@ -131,11 +131,9 @@ u64 GetBiggestReferencedOffset(const Volume& volume) // This can happen when certain programs that create WBFS files scrub the entirety of // the Masterpiece partitions in Super Smash Bros. Brawl without removing them from // the partition table. https://bugs.dolphin-emu.org/issues/8733 - const auto it = - std::remove_if(partitions.begin(), partitions.end(), [&](const Partition& partition) { - return volume.ReadSwapped(0x18, partition) != WII_DISC_MAGIC; - }); - partitions.erase(it, partitions.end()); + std::erase_if(partitions, [&](const Partition& partition) { + return volume.ReadSwapped(0x18, partition) != WII_DISC_MAGIC; + }); if (partitions.empty()) partitions.push_back(PARTITION_NONE); -- cgit v1.2.3