mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
Merge pull request #13116 from mitaclaw/ranges-modernization-8-trivial-of
Ranges Algorithms Modernization - Of
This commit is contained in:
@ -138,10 +138,9 @@ void GraphicsModListWidget::RefreshModList()
|
||||
for (const GraphicsModConfig& mod : m_mod_group.GetMods())
|
||||
{
|
||||
// If no group matches the mod's features, or if the mod has no features, skip it
|
||||
if (std::none_of(mod.m_features.begin(), mod.m_features.end(),
|
||||
[&groups](const GraphicsModFeatureConfig& feature) {
|
||||
return groups.contains(feature.m_group);
|
||||
}))
|
||||
if (std::ranges::none_of(mod.m_features, [&groups](const GraphicsModFeatureConfig& feature) {
|
||||
return groups.contains(feature.m_group);
|
||||
}))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -598,9 +598,8 @@ void ShakeMappingIndicator::Update(float elapsed_seconds)
|
||||
|
||||
m_position_samples.push_front(ShakeSample{m_motion_state.position / MAX_DISTANCE});
|
||||
|
||||
const bool any_non_zero_samples =
|
||||
std::any_of(m_position_samples.begin(), m_position_samples.end(),
|
||||
[](const ShakeSample& s) { return s.state.LengthSquared() != 0.0; });
|
||||
const bool any_non_zero_samples = std::ranges::any_of(
|
||||
m_position_samples, [](const ShakeSample& s) { return s.state.LengthSquared() != 0.0; });
|
||||
|
||||
// Only start moving the line if there's non-zero data.
|
||||
if (m_grid_line_position || any_non_zero_samples)
|
||||
|
Reference in New Issue
Block a user