From ac26f8e79fbf640ba770a35c1f051c2816f6346f Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 28 May 2015 20:28:48 -0400 Subject: Pass strings by const reference where possible --- Source/Core/InputCommon/ControllerInterface/ExpressionParser.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/Core/InputCommon/ControllerInterface/ExpressionParser.cpp') diff --git a/Source/Core/InputCommon/ControllerInterface/ExpressionParser.cpp b/Source/Core/InputCommon/ControllerInterface/ExpressionParser.cpp index abe3043aa1..9837ea74cb 100644 --- a/Source/Core/InputCommon/ControllerInterface/ExpressionParser.cpp +++ b/Source/Core/InputCommon/ControllerInterface/ExpressionParser.cpp @@ -92,7 +92,7 @@ public: std::string expr; std::string::iterator it; - Lexer(std::string expr_) : expr(expr_) + Lexer(const std::string& expr_) : expr(expr_) { it = expr.begin(); } @@ -568,7 +568,7 @@ Expression::~Expression() delete node; } -static ExpressionParseStatus ParseExpressionInner(std::string str, ControlFinder &finder, Expression **expr_out) +static ExpressionParseStatus ParseExpressionInner(const std::string& str, ControlFinder &finder, Expression **expr_out) { ExpressionParseStatus status; Expression *expr; @@ -592,7 +592,7 @@ static ExpressionParseStatus ParseExpressionInner(std::string str, ControlFinder return EXPRESSION_PARSE_SUCCESS; } -ExpressionParseStatus ParseExpression(std::string str, ControlFinder &finder, Expression **expr_out) +ExpressionParseStatus ParseExpression(const std::string& str, ControlFinder &finder, Expression **expr_out) { // Add compatibility with old simple expressions, which are simple // barewords control names. -- cgit v1.2.3