diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 35cd1fd1d..c57fd413e 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -3207,8 +3207,8 @@ void CheckOther::knownArgumentError(const Token *tok, const Token *ftok, const V } const MathLib::bigint intvalue = value->intvalue; - const std::string expr = tok->expressionString(); - const std::string fun = ftok->str(); + const std::string &expr = tok->expressionString(); + const std::string &fun = ftok->str(); const char *id;; std::string errmsg = "Argument '" + expr + "' to function " + fun + " is always " + std::to_string(intvalue) + ". ";