Skip to content

Commit a58653f

Browse files
committed
vf_settokenvalue.cpp: avoid unnecessary copy in setTokenValue() [skip ci]
1 parent 2b4bcc1 commit a58653f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/vf_settokenvalue.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,9 @@ namespace ValueFlow
258258
}
259259

260260
if (Token::simpleMatch(parent, "=") && astIsRHS(tok)) {
261-
setTokenValue(parent, value, settings);
262-
if (!value.isUninitValue())
261+
const bool isUninit = value.isUninitValue();
262+
setTokenValue(parent, std::move(value), settings);
263+
if (!isUninit)
263264
return;
264265
}
265266

0 commit comments

Comments
 (0)