summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface
diff options
context:
space:
mode:
authormitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-09-28 20:19:03 -0700
committermitaclaw <140017135+mitaclaw@users.noreply.github.com>2024-10-17 18:39:12 -0700
commit5f3a8ff0de9d89ec162e1d2be7611b10f3d3740f (patch)
tree5f0ac4cdb245eb84e5a57e7d380330c57b970c86 /Source/Core/InputCommon/ControllerInterface
parentbe0b13da97121d9ca1b1d454cf3a36bcccb5173b (diff)
Modernize `std::unique` with ranges
The new return value is `std::ranges::subrange`.
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp b/Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp
index 1877e8294c..b50621bc92 100644
--- a/Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp
@@ -129,7 +129,8 @@ BuildExpression(const std::vector<ciface::Core::DeviceContainer::InputDetection>
// Remove duplicates
std::ranges::sort(alternations);
- alternations.erase(std::unique(alternations.begin(), alternations.end()), alternations.end());
+ const auto unique_result = std::ranges::unique(alternations);
+ alternations.erase(unique_result.begin(), unique_result.end());
return fmt::to_string(fmt::join(alternations, "|"));
}