mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-27 15:04:23 +01:00
freezer: Take address values by value
VAddr will always be 64-bit, so there's no need to take a trivial primitive alias by reference.
This commit is contained in:
parent
253a17451b
commit
06ab28263b
@ -113,7 +113,7 @@ void Freezer::Unfreeze(VAddr address) {
|
|||||||
bool Freezer::IsFrozen(VAddr address) const {
|
bool Freezer::IsFrozen(VAddr address) const {
|
||||||
std::lock_guard lock{entries_mutex};
|
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;
|
return entry.address == address;
|
||||||
}) != entries.end();
|
}) != entries.end();
|
||||||
}
|
}
|
||||||
@ -121,7 +121,7 @@ bool Freezer::IsFrozen(VAddr address) const {
|
|||||||
void Freezer::SetFrozenValue(VAddr address, u64 value) {
|
void Freezer::SetFrozenValue(VAddr address, u64 value) {
|
||||||
std::lock_guard lock{entries_mutex};
|
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;
|
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::optional<Freezer::Entry> Freezer::GetEntry(VAddr address) const {
|
||||||
std::lock_guard lock{entries_mutex};
|
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;
|
return entry.address == address;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user