diff options
| author | Lioncash <mathew1800@gmail.com> | 2015-05-28 20:28:48 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2015-05-28 20:54:55 -0400 |
| commit | ac26f8e79fbf640ba770a35c1f051c2816f6346f (patch) | |
| tree | 86b0b0da5ddfd5659eeaf39f07e314012798cd33 /Source/Core/InputCommon/ControllerInterface/ExpressionParser.cpp | |
| parent | 6ff3fcee597663066c966a54ee51aab7fa166cd9 (diff) | |
Pass strings by const reference where possible
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/ExpressionParser.cpp')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/ExpressionParser.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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. |
