diff options
| author | Tilka <tilkax@gmail.com> | 2024-07-21 19:06:55 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-21 19:06:55 +0100 |
| commit | 7bd2a7bde301c9dc255ae45e60fcfcd8ba10aecc (patch) | |
| tree | 3494efb586ed037db2c63b13d7f482f4599bfedc /Source/Core/DiscIO/DiscUtils.cpp | |
| parent | 652245006dc947c63b118174d216b24779aa1f21 (diff) | |
| parent | 982893b04cb3605f7703ebf2b9a99d33efa3b3eb (diff) | |
Merge pull request #12945 from Tilka/erase_if
Use C++20 erase_if() instead of erase(remove_if()) (NFC)
Diffstat (limited to 'Source/Core/DiscIO/DiscUtils.cpp')
| -rw-r--r-- | Source/Core/DiscIO/DiscUtils.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
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<u32>(0x18, partition) != WII_DISC_MAGIC; - }); - partitions.erase(it, partitions.end()); + std::erase_if(partitions, [&](const Partition& partition) { + return volume.ReadSwapped<u32>(0x18, partition) != WII_DISC_MAGIC; + }); if (partitions.empty()) partitions.push_back(PARTITION_NONE); |
