Fix Cppcheck passedByValue warning
This commit is contained in:
parent
0e8f2cdf63
commit
aaf1af6736
|
@ -8493,7 +8493,7 @@ void Tokenizer::eraseDeadCode(Token *begin, const Token *end)
|
|||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void Tokenizer::syntaxError(const Token *tok, const std::string code) const
|
||||
void Tokenizer::syntaxError(const Token *tok, const std::string &code) const
|
||||
{
|
||||
printDebugOutput(0);
|
||||
throw InternalError(tok, code.empty() ? "syntax error" : "syntax error: " + code, InternalError::SYNTAX);
|
||||
|
|
|
@ -597,7 +597,7 @@ private:
|
|||
public:
|
||||
|
||||
/** Syntax error */
|
||||
void syntaxError(const Token *tok, const std::string code = "") const;
|
||||
void syntaxError(const Token *tok, const std::string &code = "") const;
|
||||
|
||||
/** Syntax error. Unmatched character. */
|
||||
void unmatchedToken(const Token *tok) const;
|
||||
|
|
Loading…
Reference in New Issue