Avoid copying std::list object in valueFlowAfterAssign
This commit is contained in:
parent
194e4a71a4
commit
0cc5b67bf6
|
@ -978,8 +978,8 @@ static void valueFlowAfterAssign(TokenList *tokenlist, ErrorLogger *errorLogger,
|
||||||
// Rhs values..
|
// Rhs values..
|
||||||
if (!tok->astOperand2() || tok->astOperand2()->values.empty())
|
if (!tok->astOperand2() || tok->astOperand2()->values.empty())
|
||||||
continue;
|
continue;
|
||||||
std::list<ValueFlow::Value> values = tok->astOperand2()->values;
|
|
||||||
|
|
||||||
|
const std::list<ValueFlow::Value>& values = tok->astOperand2()->values;
|
||||||
const bool constValue = tok->astOperand2()->isNumber();
|
const bool constValue = tok->astOperand2()->isNumber();
|
||||||
valueFlowForward(tok, endOfVarScope, var, varid, values, constValue, tokenlist, errorLogger, settings);
|
valueFlowForward(tok, endOfVarScope, var, varid, values, constValue, tokenlist, errorLogger, settings);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue