Code cleanup. Use 'isDelete' instead of token match

This commit is contained in:
Dmitry-Me 2014-11-28 17:50:23 +01:00 committed by Daniel Marjamäki
parent 828fdb6c47
commit 5e37275b2a
1 changed files with 2 additions and 2 deletions

View File

@ -1118,8 +1118,8 @@ void CheckClass::operatorEq()
for (func = scope->functionList.begin(); func != scope->functionList.end(); ++func) {
if (func->type == Function::eOperatorEqual && func->access != Private) {
// skip if there's =delete in the declaration - cannot be called anyway
if (func->tokenDef && func->tokenDef->next() && Token::Match(func->tokenDef->next()->link(), ") const| = delete"))
// skip "deleted" functions - cannot be called anyway
if (func->isDelete)
continue;
// use definition for check so we don't have to deal with qualification
if (!(Token::Match(func->retDef, "%type% &") && func->retDef->str() == scope->className)) {