Merge overlapping patterns
This commit is contained in:
parent
42b310e337
commit
4a75ac58cf
|
@ -1216,10 +1216,8 @@ void CheckUnusedVar::checkStructMemberUsage()
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Try to prevent false positives when struct members are not used directly.
|
// Try to prevent false positives when struct members are not used directly.
|
||||||
if (Token::findmatch(tok, (structname + " *").c_str()))
|
if (Token::findmatch(tok, (structname + " %type%| *").c_str()))
|
||||||
structname.clear();
|
structname.clear();
|
||||||
else if (Token::findmatch(tok, (structname + " %type% *").c_str()))
|
|
||||||
structname = "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tok->str() == "}")
|
if (tok->str() == "}")
|
||||||
|
|
Loading…
Reference in New Issue