Avoid copying std::list object in valueFlowAfterAssign

This commit is contained in:
PKEuS 2014-09-24 13:22:05 +02:00
parent 194e4a71a4
commit 0cc5b67bf6
1 changed files with 1 additions and 1 deletions

View File

@ -978,8 +978,8 @@ static void valueFlowAfterAssign(TokenList *tokenlist, ErrorLogger *errorLogger,
// Rhs values..
if (!tok->astOperand2() || tok->astOperand2()->values.empty())
continue;
std::list<ValueFlow::Value> values = tok->astOperand2()->values;
const std::list<ValueFlow::Value>& values = tok->astOperand2()->values;
const bool constValue = tok->astOperand2()->isNumber();
valueFlowForward(tok, endOfVarScope, var, varid, values, constValue, tokenlist, errorLogger, settings);
}