Merge pull request #564 from Dmitry-Me/mergeOverlappingPatterns1

Merge overlapping patterns
This commit is contained in:
amai2012 2015-03-20 19:22:17 +01:00
commit 1b9b57524e
1 changed files with 1 additions and 3 deletions

View File

@ -1216,10 +1216,8 @@ void CheckUnusedVar::checkStructMemberUsage()
continue;
// 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();
else if (Token::findmatch(tok, (structname + " %type% *").c_str()))
structname = "";
}
if (tok->str() == "}")