From 253a17451b45613b167c95ecd20d7250c8fec55d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 6 Aug 2020 03:03:02 -0400 Subject: freezer: Make use of std::erase_if With C++20 we can simplify the erasing idiom. --- src/core/tools/freezer.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/core') diff --git a/src/core/tools/freezer.cpp b/src/core/tools/freezer.cpp index 2003e096f..c0d9004dd 100644 --- a/src/core/tools/freezer.cpp +++ b/src/core/tools/freezer.cpp @@ -107,10 +107,7 @@ void Freezer::Unfreeze(VAddr address) { LOG_DEBUG(Common_Memory, "Unfreezing memory for address={:016X}", address); - entries.erase( - std::remove_if(entries.begin(), entries.end(), - [&address](const Entry& entry) { return entry.address == address; }), - entries.end()); + std::erase_if(entries, [address](const Entry& entry) { return entry.address == address; }); } bool Freezer::IsFrozen(VAddr address) const { -- cgit v1.2.3