From 4d81b77249e2872499c586f442405d7c943d6c0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 30 Jun 2019 18:43:55 +0200 Subject: [PATCH] Fixed Cppcheck warning, condition is always false --- lib/tokenize.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 55ce26499..a9c9c083a 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -1868,7 +1868,6 @@ bool Tokenizer::simplifyUsing() std::list scopeList; bool inTemplateDefinition = false; const Token *endOfTemplateDefinition = nullptr; - bool isVariable = false; struct Using { Using(Token *start, Token *end) : startTok(start), endTok(end) { } Token *startTok; @@ -1892,9 +1891,7 @@ bool Tokenizer::simplifyUsing() if (inTemplateDefinition) { if (!endOfTemplateDefinition) { - if (isVariable) - endOfTemplateDefinition = findSemicolon(tok); - else if (tok->str() == "{") + if (tok->str() == "{") endOfTemplateDefinition = tok->link(); } if (tok == endOfTemplateDefinition) {