From 2b0cd16c8c266bc1e298e49d4009eab8c9c23f99 Mon Sep 17 00:00:00 2001 From: mitaclaw <140017135+mitaclaw@users.noreply.github.com> Date: Mon, 30 Sep 2024 15:05:17 -0700 Subject: Modernize `std::none_of` with ranges In JitRegCache.cpp, the lambda predicate were replaced by a pointer to member function because ranges algorithms are able to invoke those. In ConvertDialog.cpp, the `std::mem_fn` helper was removed because ranges algorithms are able to handle pointers to member functions as predicates. In BoundingBox.cpp, the lambda predicate was returning the bool element unchanged, so `std::identity` was a better fit. --- Source/Android/jni/Cheats/GraphicsModGroup.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Source/Android/jni/Cheats/GraphicsModGroup.cpp') diff --git a/Source/Android/jni/Cheats/GraphicsModGroup.cpp b/Source/Android/jni/Cheats/GraphicsModGroup.cpp index 35a5a92f08..7affca0ef6 100644 --- a/Source/Android/jni/Cheats/GraphicsModGroup.cpp +++ b/Source/Android/jni/Cheats/GraphicsModGroup.cpp @@ -51,10 +51,9 @@ Java_org_dolphinemu_dolphinemu_features_cheats_model_GraphicsModGroup_getMods(JN for (GraphicsModConfig& mod : 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; } -- cgit v1.2.3