diff options
| author | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-09-21 14:43:21 -0700 |
|---|---|---|
| committer | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2025-03-09 13:26:35 -0700 |
| commit | 62b2b939b5825e48c89b8a3ebb97d9fc38cb59e5 (patch) | |
| tree | af5356391662ec172ec15454d3f844fa2b67db19 /Source/Core/DiscIO/WIABlob.cpp | |
| parent | 1e5e9219cd122761911bb426750af72c750c7efd (diff) | |
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`.
Diffstat (limited to 'Source/Core/DiscIO/WIABlob.cpp')
| -rw-r--r-- | Source/Core/DiscIO/WIABlob.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/DiscIO/WIABlob.cpp b/Source/Core/DiscIO/WIABlob.cpp index ec39245884..c59802c947 100644 --- a/Source/Core/DiscIO/WIABlob.cpp +++ b/Source/Core/DiscIO/WIABlob.cpp @@ -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; } |
