From 9aea481e5915b9c615aa9bb40f1e45d4cb264e72 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 12 Dec 2023 13:31:58 -0500 Subject: [PATCH] ExpressionParser: Make use of std::erase_if --- .../InputCommon/ControlReference/ExpressionParser.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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)