mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-26 16:52:46 +01:00
freezer: Make use of std::erase_if
With C++20 we can simplify the erasing idiom.
This commit is contained in:
parent
1cc0e4b4d8
commit
253a17451b
1 changed files with 1 additions and 4 deletions
|
@ -107,10 +107,7 @@ void Freezer::Unfreeze(VAddr address) {
|
||||||
|
|
||||||
LOG_DEBUG(Common_Memory, "Unfreezing memory for address={:016X}", address);
|
LOG_DEBUG(Common_Memory, "Unfreezing memory for address={:016X}", address);
|
||||||
|
|
||||||
entries.erase(
|
std::erase_if(entries, [address](const Entry& entry) { return entry.address == address; });
|
||||||
std::remove_if(entries.begin(), entries.end(),
|
|
||||||
[&address](const Entry& entry) { return entry.address == address; }),
|
|
||||||
entries.end());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Freezer::IsFrozen(VAddr address) const {
|
bool Freezer::IsFrozen(VAddr address) const {
|
||||||
|
|
Loading…
Reference in a new issue