mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
ExpressionParser: Make use of std::erase_if
This commit is contained in:
@ -963,11 +963,9 @@ static ParseResult ParseComplexExpression(const std::string& str)
|
|||||||
|
|
||||||
void RemoveInertTokens(std::vector<Token>* tokens)
|
void RemoveInertTokens(std::vector<Token>* tokens)
|
||||||
{
|
{
|
||||||
tokens->erase(std::remove_if(tokens->begin(), tokens->end(),
|
std::erase_if(*tokens, [](const Token& tok) {
|
||||||
[](const Token& tok) {
|
return tok.type == TOK_COMMENT || tok.type == TOK_WHITESPACE;
|
||||||
return tok.type == TOK_COMMENT || tok.type == TOK_WHITESPACE;
|
});
|
||||||
}),
|
|
||||||
tokens->end());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::unique_ptr<Expression> ParseBarewordExpression(const std::string& str)
|
static std::unique_ptr<Expression> ParseBarewordExpression(const std::string& str)
|
||||||
|
Reference in New Issue
Block a user