Skip to content

Commit 18222e1

Browse files
committed
valueflow.cpp: avoid unnecessary copy in valueFlowSafeFunctions()
1 parent f9efc51 commit 18222e1

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
@@ -7006,8 +7006,8 @@ static void valueFlowSafeFunctions(const TokenList& tokenlist, const SymbolDatab
70067006
argValues.back().valueType = ValueFlow::Value::ValueType::CONTAINER_SIZE;
70077007
argValues.back().errorPath.emplace_back(arg.nameToken(), "Assuming " + arg.name() + " size is 1000000");
70087008
argValues.back().safe = true;
7009-
for (const ValueFlow::Value &value : argValues)
7010-
valueFlowForward(const_cast<Token*>(functionScope->bodyStart), arg.nameToken(), value, tokenlist, errorLogger, settings);
7009+
for (ValueFlow::Value &value : argValues)
7010+
valueFlowForward(const_cast<Token*>(functionScope->bodyStart), arg.nameToken(), std::move(value), tokenlist, errorLogger, settings);
70117011
continue;
70127012
}
70137013

0 commit comments

Comments
 (0)