mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Merge pull request #13093 from mitaclaw/ranges-modernization-4-projection
Ranges Algorithms Modernization - Projection
This commit is contained in:
@ -154,10 +154,9 @@ QGroupBox* MappingWidget::CreateGroupBox(const QString& name, ControllerEmu::Con
|
||||
[group_enable_checkbox, group] { group_enable_checkbox->setChecked(group->enabled); });
|
||||
}
|
||||
|
||||
const auto advanced_setting_count = std::count_if(
|
||||
group->numeric_settings.begin(), group->numeric_settings.end(), [](auto& setting) {
|
||||
return setting->GetVisibility() == ControllerEmu::SettingVisibility::Advanced;
|
||||
});
|
||||
const auto advanced_setting_count =
|
||||
std::ranges::count(group->numeric_settings, ControllerEmu::SettingVisibility::Advanced,
|
||||
&ControllerEmu::NumericSettingBase::GetVisibility);
|
||||
|
||||
if (advanced_setting_count != 0)
|
||||
{
|
||||
|
@ -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