From 7295458c11e1465c9e0a823620ea935396c4ea39 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Sat, 12 Oct 2019 12:28:19 -0500 Subject: [PATCH] ExpressionParser: Make Lexer ctor explicit and move argument. --- Source/Core/InputCommon/ControlReference/ExpressionParser.cpp | 2 +- Source/Core/InputCommon/ControlReference/ExpressionParser.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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);