mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -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:
@ -181,8 +181,8 @@ QGroupBox* NewPatchDialog::CreateEntry(const PatchEngine::PatchEntry& entry)
|
||||
m_entry_layout->removeWidget(box);
|
||||
box->deleteLater();
|
||||
|
||||
m_entries.erase(std::find_if(m_entries.begin(), m_entries.end(),
|
||||
[new_entry](const auto& e) { return e.get() == new_entry; }));
|
||||
m_entries.erase(
|
||||
std::ranges::find(m_entries, new_entry, [](const auto& e) { return e.get(); }));
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user