Fixed Cppcheck internal warning
This commit is contained in:
parent
1965f2cc9f
commit
a11a0e79e4
|
@ -1454,7 +1454,7 @@ bool CheckUnusedVar::isRecordTypeWithoutSideEffects(const Type* type)
|
||||||
for (const Function& f : type->classScope->functionList) {
|
for (const Function& f : type->classScope->functionList) {
|
||||||
if (!f.isConstructor())
|
if (!f.isConstructor())
|
||||||
continue;
|
continue;
|
||||||
if (f.argDef && Token::Match(f.argDef->link(), ") ="))
|
if (f.argDef && Token::simpleMatch(f.argDef->link(), ") ="))
|
||||||
continue; // ignore default/deleted constructors
|
continue; // ignore default/deleted constructors
|
||||||
const bool emptyBody = (f.functionScope && Token::simpleMatch(f.functionScope->bodyStart, "{ }"));
|
const bool emptyBody = (f.functionScope && Token::simpleMatch(f.functionScope->bodyStart, "{ }"));
|
||||||
const bool hasInitList = f.argDef && Token::simpleMatch(f.argDef->link(), ") :");
|
const bool hasInitList = f.argDef && Token::simpleMatch(f.argDef->link(), ") :");
|
||||||
|
|
Loading…
Reference in New Issue