mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Simplify std::find_if
with std::ranges::find
and projections
In LabelMap.cpp, the code is currently unused so I was unable to test it. In WiiUtils.cpp, the magic value `1u` was replaced by the constant value `DiscIO::PARTITION_UPDATE`.
This commit is contained in:
@ -1372,8 +1372,8 @@ WIARVZFileReader<RVZ>::ProcessAndCompress(CompressThreadState* state, CompressPa
|
||||
TryReuse(reusable_groups, reusable_groups_mutex, &entry);
|
||||
if (!entry.reused_group && reuse_id)
|
||||
{
|
||||
const auto it = std::find_if(output_entries.begin(), output_entries.begin() + i,
|
||||
[reuse_id](const auto& e) { return e.reuse_id == reuse_id; });
|
||||
const auto it = std::ranges::find(output_entries.begin(), output_entries.begin() + i,
|
||||
reuse_id, &OutputParametersEntry::reuse_id);
|
||||
if (it != output_entries.begin() + i)
|
||||
entry.reused_group = it->reused_group;
|
||||
}
|
||||
|
Reference in New Issue
Block a user