Remove redundant variable and manipulation thereof
This commit is contained in:
parent
9497732ac8
commit
298021af1f
|
@ -512,12 +512,8 @@ void CheckStl::erase()
|
|||
const Token *decltok = variableInfo ? variableInfo->typeEndToken() : nullptr;
|
||||
|
||||
// Is variable an iterator?
|
||||
bool isIterator = false;
|
||||
if (decltok && Token::Match(decltok->tokAt(-2), "> :: iterator %varid%", tok2->next()->varId()))
|
||||
isIterator = true;
|
||||
|
||||
// If tok2->next() is an iterator, check scope
|
||||
if (isIterator)
|
||||
if (decltok && Token::Match(decltok->tokAt(-2), "> :: iterator %varid%", tok2->next()->varId()))
|
||||
EraseCheckLoop::checkScope(this, tok2->next());
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue