diff options
author | Lioncash <mathew1800@gmail.com> | 2020-08-06 09:04:52 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-08-06 09:04:54 +0200 |
commit | 06ab28263b783e6ae07e51cdc43c0c381c5ae583 (patch) | |
tree | edbd3844a5dc42b3499da9d2216938bfe77e4d81 /src | |
parent | freezer: Make use of std::erase_if (diff) | |
download | yuzu-06ab28263b783e6ae07e51cdc43c0c381c5ae583.tar yuzu-06ab28263b783e6ae07e51cdc43c0c381c5ae583.tar.gz yuzu-06ab28263b783e6ae07e51cdc43c0c381c5ae583.tar.bz2 yuzu-06ab28263b783e6ae07e51cdc43c0c381c5ae583.tar.lz yuzu-06ab28263b783e6ae07e51cdc43c0c381c5ae583.tar.xz yuzu-06ab28263b783e6ae07e51cdc43c0c381c5ae583.tar.zst yuzu-06ab28263b783e6ae07e51cdc43c0c381c5ae583.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/tools/freezer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/tools/freezer.cpp b/src/core/tools/freezer.cpp index c0d9004dd..4ca1870f2 100644 --- a/src/core/tools/freezer.cpp +++ b/src/core/tools/freezer.cpp @@ -113,7 +113,7 @@ void Freezer::Unfreeze(VAddr address) { bool Freezer::IsFrozen(VAddr address) const { std::lock_guard lock{entries_mutex}; - return std::find_if(entries.begin(), entries.end(), [&address](const Entry& entry) { + return std::find_if(entries.begin(), entries.end(), [address](const Entry& entry) { return entry.address == address; }) != entries.end(); } @@ -121,7 +121,7 @@ bool Freezer::IsFrozen(VAddr address) const { void Freezer::SetFrozenValue(VAddr address, u64 value) { std::lock_guard lock{entries_mutex}; - const auto iter = std::find_if(entries.begin(), entries.end(), [&address](const Entry& entry) { + const auto iter = std::find_if(entries.begin(), entries.end(), [address](const Entry& entry) { return entry.address == address; }); @@ -140,7 +140,7 @@ void Freezer::SetFrozenValue(VAddr address, u64 value) { std::optional<Freezer::Entry> Freezer::GetEntry(VAddr address) const { std::lock_guard lock{entries_mutex}; - const auto iter = std::find_if(entries.begin(), entries.end(), [&address](const Entry& entry) { + const auto iter = std::find_if(entries.begin(), entries.end(), [address](const Entry& entry) { return entry.address == address; }); |