mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 20:58:54 +00:00
Use C++20 erase_if() instead of erase(remove_if()) (NFC)
This commit is contained in:
parent
1fcb2ee5c1
commit
982893b04c
4 changed files with 13 additions and 22 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue