@@ -771,7 +771,7 @@ static void setTokenValue(Token* tok,
771771 }
772772
773773 else if (parent->str () == " :" ) {
774- setTokenValue (parent,value,settings);
774+ setTokenValue (parent,std::move ( value) ,settings);
775775 }
776776
777777 else if (parent->str () == " ?" && tok->str () == " :" && tok == parent->astOperand2 () && parent->astOperand1 ()) {
@@ -1619,7 +1619,7 @@ static void valueFlowArrayElement(TokenList& tokenlist, const Settings& settings
16191619 const std::string s = arrayValue.tokvalue ->strValue ();
16201620 if (index == s.size ()) {
16211621 result.intvalue = 0 ;
1622- setTokenValue (tok, result, settings);
1622+ setTokenValue (tok, std::move ( result) , settings);
16231623 } else if (index >= 0 && index < s.size ()) {
16241624 result.intvalue = s[index];
16251625 setTokenValue (tok, std::move (result), settings);
@@ -4009,7 +4009,7 @@ static void valueFlowForwardLifetime(Token * tok, TokenList &tokenlist, ErrorLog
40094009 const Token* parentLifetime =
40104010 getParentLifetime (tokenlist.isCPP (), parent->astOperand1 ()->astOperand2 (), &settings.library );
40114011 if (parentLifetime && parentLifetime->exprId () > 0 ) {
4012- valueFlowForward (nextExpression, endOfVarScope, parentLifetime, values, tokenlist, errorLogger, settings);
4012+ valueFlowForward (nextExpression, endOfVarScope, parentLifetime, std::move ( values) , tokenlist, errorLogger, settings);
40134013 }
40144014 }
40154015 }
@@ -8472,7 +8472,7 @@ static void valueFlowSmartPointer(TokenList &tokenlist, ErrorLogger * errorLogge
84728472 if (Token::simpleMatch (ftok, " ( )" )) {
84738473 ValueFlow::Value v (0 );
84748474 v.setKnown ();
8475- valueFlowForwardAssign (ftok, tok, vars, {std::move (v)}, false , tokenlist, errorLogger, settings);
8475+ valueFlowForwardAssign (ftok, tok, std::move ( vars) , {std::move (v)}, false , tokenlist, errorLogger, settings);
84768476 } else {
84778477 tok->removeValues (std::mem_fn (&ValueFlow::Value::isIntValue));
84788478 Token* inTok = ftok->astOperand2 ();
@@ -8927,7 +8927,7 @@ static void valueFlowContainerSize(TokenList& tokenlist,
89278927 ValueFlow::Value value (0 );
89288928 value.valueType = ValueFlow::Value::ValueType::CONTAINER_SIZE;
89298929 value.setImpossible ();
8930- valueFlowForward (tok->linkAt (2 ), containerTok, value, tokenlist, errorLogger, settings);
8930+ valueFlowForward (tok->linkAt (2 ), containerTok, std::move ( value) , tokenlist, errorLogger, settings);
89318931 }
89328932 } else if (Token::simpleMatch (tok, " +=" ) && astIsContainer (tok->astOperand1 ())) {
89338933 const Token* containerTok = tok->astOperand1 ();
0 commit comments