Refactoring; Use Token::isUnaryOp() to clarify code

This commit is contained in:
Daniel Marjamäki 2018-07-13 23:12:20 +02:00
parent 2c90a83695
commit 54cfdb731e
1 changed files with 1 additions and 1 deletions

View File

@ -312,7 +312,7 @@ static bool isAddressOf(const Token *tok)
const Token *tok2 = tok->astParent();
while (Token::Match(tok2, "%name%|.|::|["))
tok2 = tok2->astParent();
return tok2 && tok2->str() == "&" && !(tok2->astOperand1() && tok2->astOperand2());
return tok2 && tok2->isUnaryOp("&");
}
/**