From 4a75ac58cff88706c9d3b6e6b0f87f166452de8b Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Fri, 20 Mar 2015 11:06:18 +0300 Subject: [PATCH] Merge overlapping patterns --- lib/checkunusedvar.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/checkunusedvar.cpp b/lib/checkunusedvar.cpp index 59e7a7a06..0a8e5543e 100644 --- a/lib/checkunusedvar.cpp +++ b/lib/checkunusedvar.cpp @@ -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() == "}")