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

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

View File

@ -1569,7 +1569,7 @@ bool CheckClass::hasAssignSelf(const Function *func, const Token *rhs)
tok2 = tok2->astOperand1();
else
continue;
if (tok2 && tok2->str() == "&" && !tok2->astOperand2() && tok2->astOperand1() && tok2->astOperand1()->str() == rhs->str())
if (tok2 && tok2->isUnaryOp("&") && tok2->astOperand1()->str() == rhs->str())
return true;
}
}