Skip to content

Commit 9cf0657

Browse files
committed
valueflow.cpp: avoid unnecessary copy in valueFlowContainerSize()
1 parent 6aa0173 commit 9cf0657

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
@@ -6768,8 +6768,8 @@ static void valueFlowContainerSize(const TokenList& tokenlist,
67686768
Token* rhs = tok->tokAt(2)->astOperand2();
67696769
std::vector<ValueFlow::Value> values = getInitListSize(rhs, containerTok->valueType(), settings);
67706770
valueFlowContainerSetTokValue(tokenlist, errorLogger, settings, containerTok, rhs);
6771-
for (const ValueFlow::Value& value : values)
6772-
valueFlowForward(containerTok->next(), containerTok, value, tokenlist, errorLogger, settings);
6771+
for (ValueFlow::Value& value : values)
6772+
valueFlowForward(containerTok->next(), containerTok, std::move(value), tokenlist, errorLogger, settings);
67736773
}
67746774
} else if (Token::Match(tok, ". %name% (") && tok->astOperand1() && tok->astOperand1()->valueType() &&
67756775
tok->astOperand1()->valueType()->container) {

0 commit comments

Comments
 (0)