Skip to content

Commit 5e37275

Browse files
Dmitry-Medanmar
authored andcommitted
Code cleanup. Use 'isDelete' instead of token match
1 parent 828fdb6 commit 5e37275

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/checkclass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,8 +1118,8 @@ void CheckClass::operatorEq()
11181118

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

0 commit comments

Comments
 (0)