From 196f8e51230f7e7ee02a4eec1f9671786a93e7d7 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 12 Dec 2023 13:31:18 -0500 Subject: MappingCommon: Make use of std::erase_if --- Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Source/Core/InputCommon') diff --git a/Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp b/Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp index 7b21cf78e0..56bab1a981 100644 --- a/Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp +++ b/Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp @@ -144,8 +144,7 @@ void RemoveSpuriousTriggerCombinations( }); }; - detections->erase(std::remove_if(detections->begin(), detections->end(), is_spurious), - detections->end()); + std::erase_if(*detections, is_spurious); } } // namespace ciface::MappingCommon -- cgit v1.2.3 From 9aea481e5915b9c615aa9bb40f1e45d4cb264e72 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 12 Dec 2023 13:31:58 -0500 Subject: ExpressionParser: Make use of std::erase_if --- Source/Core/InputCommon/ControlReference/ExpressionParser.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'Source/Core/InputCommon') diff --git a/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp b/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp index c93dcc5c3d..50e45d0ba1 100644 --- a/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp +++ b/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp @@ -963,11 +963,9 @@ static ParseResult ParseComplexExpression(const std::string& str) void RemoveInertTokens(std::vector* tokens) { - tokens->erase(std::remove_if(tokens->begin(), tokens->end(), - [](const Token& tok) { - return tok.type == TOK_COMMENT || tok.type == TOK_WHITESPACE; - }), - tokens->end()); + std::erase_if(*tokens, [](const Token& tok) { + return tok.type == TOK_COMMENT || tok.type == TOK_WHITESPACE; + }); } static std::unique_ptr ParseBarewordExpression(const std::string& str) -- cgit v1.2.3