Skip to content

Commit b2427a6

Browse files
committed
valueflow.cpp: avoid unnecessary copy in valueFlowContainerSize()
1 parent ce371be commit b2427a6

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
@@ -6748,8 +6748,8 @@ static void valueFlowContainerSize(const TokenList& tokenlist,
67486748
Token* rhs = tok->tokAt(2)->astOperand2();
67496749
std::vector<ValueFlow::Value> values = getInitListSize(rhs, containerTok->valueType(), settings);
67506750
valueFlowContainerSetTokValue(tokenlist, errorLogger, settings, containerTok, rhs);
6751-
for (const ValueFlow::Value& value : values)
6752-
valueFlowForward(containerTok->next(), containerTok, value, tokenlist, errorLogger, settings);
6751+
for (ValueFlow::Value& value : values)
6752+
valueFlowForward(containerTok->next(), containerTok, std::move(value), tokenlist, errorLogger, settings);
67536753
}
67546754
} else if (Token::Match(tok, ". %name% (") && tok->astOperand1() && tok->astOperand1()->valueType() &&
67556755
tok->astOperand1()->valueType()->container) {

0 commit comments

Comments
 (0)