mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -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:
@ -250,8 +250,7 @@ std::optional<BuildInfos> InitBuildInfos(const std::vector<TodoList::UpdateOp>&
|
||||
const std::string& install_base_path,
|
||||
const std::string& temp_dir)
|
||||
{
|
||||
const auto op_it = std::find_if(to_update.cbegin(), to_update.cend(),
|
||||
[&](const auto& op) { return op.filename == "build_info.txt"; });
|
||||
const auto op_it = std::ranges::find(to_update, "build_info.txt", &TodoList::UpdateOp::filename);
|
||||
if (op_it == to_update.cend())
|
||||
return {};
|
||||
|
||||
|
Reference in New Issue
Block a user