Remove redundant variable and manipulation thereof

This commit is contained in:
Dmitry-Me 2014-11-22 12:17:49 +01:00 committed by Daniel Marjamäki
parent 9497732ac8
commit 298021af1f
1 changed files with 1 additions and 5 deletions

View File

@ -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;