From 600919f624426f1ffafe8d068d8bd307669c3c24 Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 29 Jun 2020 15:13:06 -0500 Subject: [PATCH] Remove redundant conditions --- lib/templatesimplifier.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/templatesimplifier.cpp b/lib/templatesimplifier.cpp index 64697a786..a045cd69d 100644 --- a/lib/templatesimplifier.cpp +++ b/lib/templatesimplifier.cpp @@ -1352,7 +1352,7 @@ bool TemplateSimplifier::getTemplateNamePositionTemplateFunction(const Token *to // skip decltype(...) else if (Token::simpleMatch(tok->next(), "decltype (")) { const Token * end = tok->linkAt(2)->previous(); - while (tok && tok->next() && tok != end) { + while (tok->next() && tok != end) { tok = tok->next(); namepos++; } @@ -1361,7 +1361,7 @@ bool TemplateSimplifier::getTemplateNamePositionTemplateFunction(const Token *to if (closing) { if (closing->strAt(1) == "(" && Tokenizer::isFunctionHead(closing->next(), ";|{|:", true)) return true; - while (tok && tok->next() && tok->next() != closing) { + while (tok->next() && tok->next() != closing) { tok = tok->next(); namepos++; } @@ -1384,7 +1384,7 @@ bool TemplateSimplifier::getTemplateNamePositionTemplateVariable(const Token *to // skip decltype(...) else if (Token::simpleMatch(tok->next(), "decltype (")) { const Token * end = tok->linkAt(2); - while (tok && tok->next() && tok != end) { + while (tok->next() && tok != end) { tok = tok->next(); namepos++; } @@ -1393,7 +1393,7 @@ bool TemplateSimplifier::getTemplateNamePositionTemplateVariable(const Token *to if (closing) { if (Token::Match(closing->next(), "=|;")) return true; - while (tok && tok->next() && tok->next() != closing) { + while (tok->next() && tok->next() != closing) { tok = tok->next(); namepos++; }