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:
@ -148,9 +148,8 @@ bool UI::IsTestMode()
|
||||
bool Platform::VersionCheck(const std::vector<TodoList::UpdateOp>& to_update,
|
||||
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 == "Dolphin.app/Contents/Info.plist";
|
||||
});
|
||||
const auto op_it = std::ranges::find(to_update, "Dolphin.app/Contents/Info.plist",
|
||||
&TodoList::UpdateOp::filename);
|
||||
if (op_it == to_update.cend())
|
||||
return true;
|
||||
|
||||
|
Reference in New Issue
Block a user