Skip to content

Commit eb35e83

Browse files
committed
valueflow.cpp: avoid unnecessary copy in valueFlowContainerSize()
1 parent 0890a09 commit eb35e83

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/valueflow.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6809,8 +6809,8 @@ static void valueFlowContainerSize(const TokenList& tokenlist,
68096809
Token* rhs = tok->tokAt(2)->astOperand2();
68106810
std::vector<ValueFlow::Value> values = getInitListSize(rhs, containerTok->valueType(), settings);
68116811
valueFlowContainerSetTokValue(tokenlist, errorLogger, settings, containerTok, rhs);
6812-
for (const ValueFlow::Value& value : values)
6813-
valueFlowForward(containerTok->next(), containerTok, value, tokenlist, errorLogger, settings);
6812+
for (ValueFlow::Value& value : values)
6813+
valueFlowForward(containerTok->next(), containerTok, std::move(value), tokenlist, errorLogger, settings);
68146814
}
68156815
} else if (Token::Match(tok, ". %name% (") && tok->astOperand1() && tok->astOperand1()->valueType() &&
68166816
tok->astOperand1()->valueType()->container) {

0 commit comments

Comments
 (0)