diff --git a/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp b/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp index 7e8e54b1ec..00afc5e036 100644 --- a/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp +++ b/Source/Core/InputCommon/ControlReference/ExpressionParser.cpp @@ -34,7 +34,7 @@ bool Token::IsBinaryOperator() const return type >= TOK_BINARY_OPS_BEGIN && type < TOK_BINARY_OPS_END; } -Lexer::Lexer(const std::string& expr_) : expr(expr_) +Lexer::Lexer(std::string expr_) : expr(std::move(expr_)) { it = expr.begin(); } diff --git a/Source/Core/InputCommon/ControlReference/ExpressionParser.h b/Source/Core/InputCommon/ControlReference/ExpressionParser.h index 994f8c201b..cab6096c0e 100644 --- a/Source/Core/InputCommon/ControlReference/ExpressionParser.h +++ b/Source/Core/InputCommon/ControlReference/ExpressionParser.h @@ -71,7 +71,7 @@ public: std::string expr; std::string::iterator it; - Lexer(const std::string& expr_); + explicit Lexer(std::string expr_); ParseStatus Tokenize(std::vector& tokens);