diff --git a/lib/checkunusedvar.cpp b/lib/checkunusedvar.cpp index 7bd5c9de8..6f4b3281f 100644 --- a/lib/checkunusedvar.cpp +++ b/lib/checkunusedvar.cpp @@ -1454,7 +1454,7 @@ bool CheckUnusedVar::isRecordTypeWithoutSideEffects(const Type* type) for (const Function& f : type->classScope->functionList) { if (!f.isConstructor()) continue; - if (f.argDef && Token::Match(f.argDef->link(), ") =")) + if (f.argDef && Token::simpleMatch(f.argDef->link(), ") =")) continue; // ignore default/deleted constructors const bool emptyBody = (f.functionScope && Token::simpleMatch(f.functionScope->bodyStart, "{ }")); const bool hasInitList = f.argDef && Token::simpleMatch(f.argDef->link(), ") :");