Skip to content

Commit 436b8bd

Browse files
authored
optimized isSameConstantValue() a bit (#4441)
1 parent 251de26 commit 436b8bd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/astutils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ static inline bool isSameConstantValue(bool macro, const Token* tok1, const Toke
13081308
return false;
13091309

13101310
auto adjustForCast = [](const Token* tok) {
1311-
if (Token::Match(tok->previous(), "%type% (|{") && tok->previous()->isStandardType() && tok->astOperand2())
1311+
if (tok->astOperand2() && Token::Match(tok->previous(), "%type% (|{") && tok->previous()->isStandardType())
13121312
return tok->astOperand2();
13131313
return tok;
13141314
};

0 commit comments

Comments
 (0)