c++98 compatibility

This commit is contained in:
Daniel Marjamäki 2017-10-08 14:16:18 +02:00
parent 9c0e6986da
commit 9d27917fea
1 changed files with 2 additions and 2 deletions

View File

@ -1598,12 +1598,12 @@ void CheckStl::readingEmptyStlContainer()
// function call
if (Token::Match(tok, "!!. %name% (") && !Token::simpleMatch(tok->linkAt(2), ") {")) {
for (std::map<unsigned int, const Library::Container*>::const_iterator it = emptyContainer.begin(); it != emptyContainer.end();) {
for (std::map<unsigned int, const Library::Container*>::iterator it = emptyContainer.begin(); it != emptyContainer.end();) {
const Variable *var = _tokenizer->getSymbolDatabase()->getVariableFromVarId(it->first);
if (var && (var->isLocal() || var->isArgument()))
++it;
else
it = emptyContainer.erase(it);
emptyContainer.erase(it++);
}
}