diff options
| author | 2020-08-06 03:03:02 -0400 | |
|---|---|---|
| committer | 2020-08-06 03:03:05 -0400 | |
| commit | 253a17451b45613b167c95ecd20d7250c8fec55d (patch) | |
| tree | 63f64f242b9b606f716e03dd02711a32f9968c5a /src/core/tools/freezer.cpp | |
| parent | Merge pull request #4489 from lioncash/typesafe (diff) | |
| download | yuzu-253a17451b45613b167c95ecd20d7250c8fec55d.tar.gz yuzu-253a17451b45613b167c95ecd20d7250c8fec55d.tar.xz yuzu-253a17451b45613b167c95ecd20d7250c8fec55d.zip | |
freezer: Make use of std::erase_if
With C++20 we can simplify the erasing idiom.
Diffstat (limited to 'src/core/tools/freezer.cpp')
| -rw-r--r-- | src/core/tools/freezer.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
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) { | |||
| 107 | 107 | ||
| 108 | LOG_DEBUG(Common_Memory, "Unfreezing memory for address={:016X}", address); | 108 | LOG_DEBUG(Common_Memory, "Unfreezing memory for address={:016X}", address); |
| 109 | 109 | ||
| 110 | entries.erase( | 110 | std::erase_if(entries, [address](const Entry& entry) { return entry.address == address; }); |
| 111 | std::remove_if(entries.begin(), entries.end(), | ||
| 112 | [&address](const Entry& entry) { return entry.address == address; }), | ||
| 113 | entries.end()); | ||
| 114 | } | 111 | } |
| 115 | 112 | ||
| 116 | bool Freezer::IsFrozen(VAddr address) const { | 113 | bool Freezer::IsFrozen(VAddr address) const { |