Remove redundant conditions
This commit is contained in:
parent
07d8cb4f01
commit
600919f624
|
@ -1352,7 +1352,7 @@ bool TemplateSimplifier::getTemplateNamePositionTemplateFunction(const Token *to
|
||||||
// skip decltype(...)
|
// skip decltype(...)
|
||||||
else if (Token::simpleMatch(tok->next(), "decltype (")) {
|
else if (Token::simpleMatch(tok->next(), "decltype (")) {
|
||||||
const Token * end = tok->linkAt(2)->previous();
|
const Token * end = tok->linkAt(2)->previous();
|
||||||
while (tok && tok->next() && tok != end) {
|
while (tok->next() && tok != end) {
|
||||||
tok = tok->next();
|
tok = tok->next();
|
||||||
namepos++;
|
namepos++;
|
||||||
}
|
}
|
||||||
|
@ -1361,7 +1361,7 @@ bool TemplateSimplifier::getTemplateNamePositionTemplateFunction(const Token *to
|
||||||
if (closing) {
|
if (closing) {
|
||||||
if (closing->strAt(1) == "(" && Tokenizer::isFunctionHead(closing->next(), ";|{|:", true))
|
if (closing->strAt(1) == "(" && Tokenizer::isFunctionHead(closing->next(), ";|{|:", true))
|
||||||
return true;
|
return true;
|
||||||
while (tok && tok->next() && tok->next() != closing) {
|
while (tok->next() && tok->next() != closing) {
|
||||||
tok = tok->next();
|
tok = tok->next();
|
||||||
namepos++;
|
namepos++;
|
||||||
}
|
}
|
||||||
|
@ -1384,7 +1384,7 @@ bool TemplateSimplifier::getTemplateNamePositionTemplateVariable(const Token *to
|
||||||
// skip decltype(...)
|
// skip decltype(...)
|
||||||
else if (Token::simpleMatch(tok->next(), "decltype (")) {
|
else if (Token::simpleMatch(tok->next(), "decltype (")) {
|
||||||
const Token * end = tok->linkAt(2);
|
const Token * end = tok->linkAt(2);
|
||||||
while (tok && tok->next() && tok != end) {
|
while (tok->next() && tok != end) {
|
||||||
tok = tok->next();
|
tok = tok->next();
|
||||||
namepos++;
|
namepos++;
|
||||||
}
|
}
|
||||||
|
@ -1393,7 +1393,7 @@ bool TemplateSimplifier::getTemplateNamePositionTemplateVariable(const Token *to
|
||||||
if (closing) {
|
if (closing) {
|
||||||
if (Token::Match(closing->next(), "=|;"))
|
if (Token::Match(closing->next(), "=|;"))
|
||||||
return true;
|
return true;
|
||||||
while (tok && tok->next() && tok->next() != closing) {
|
while (tok->next() && tok->next() != closing) {
|
||||||
tok = tok->next();
|
tok = tok->next();
|
||||||
namepos++;
|
namepos++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue