summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2024-10-27 19:17:01 -0400
committerGitHub <noreply@github.com>2024-10-27 19:17:01 -0400
commit96c9591b9940a72ba00b17d89f6cf2911c923631 (patch)
tree4e584dd380367dfe3b8c00e0b932a8ca3f97051b /Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp
parent1b13cc9ca443ba46bf2b0a13366f5f49cbd9505c (diff)
parentff6845288e376c4cb60645a96525d8ae63549c8e (diff)
Merge pull request #13096 from mitaclaw/ranges-modernization-7-rewrite
Ranges Algorithms Modernization - Rewrite
Diffstat (limited to 'Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp')
-rw-r--r--Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp b/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp
index 76a6d11cdd..3d2bd020e4 100644
--- a/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp
+++ b/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp
@@ -314,20 +314,14 @@ void GeckoCodeWidget::SortAlphabetically()
void GeckoCodeWidget::SortEnabledCodesFirst()
{
- std::stable_sort(m_gecko_codes.begin(), m_gecko_codes.end(), [](const auto& a, const auto& b) {
- return a.enabled && a.enabled != b.enabled;
- });
-
+ std::ranges::stable_partition(m_gecko_codes, std::identity{}, &Gecko::GeckoCode::enabled);
UpdateList();
SaveCodes();
}
void GeckoCodeWidget::SortDisabledCodesFirst()
{
- std::stable_sort(m_gecko_codes.begin(), m_gecko_codes.end(), [](const auto& a, const auto& b) {
- return !a.enabled && a.enabled != b.enabled;
- });
-
+ std::ranges::stable_partition(m_gecko_codes, std::logical_not{}, &Gecko::GeckoCode::enabled);
UpdateList();
SaveCodes();
}