Don't save an iterator, just use post-increment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17981 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2004-11-19 03:44:10 +00:00
parent 37d8bd92a2
commit 57646ec44e
2 changed files with 4 additions and 8 deletions

View File

@ -472,10 +472,8 @@ Archive::findModulesDefiningSymbols(std::set<std::string>& symbols,
result.insert(mp);
// Remove the symbol now that its been resolved, being careful to
// not invalidate our iterator.
std::set<std::string>::iterator save = I;
++I;
symbols.erase(save);
// post-increment the iterator.
symbols.erase(I++);
} else {
++I;
}

View File

@ -472,10 +472,8 @@ Archive::findModulesDefiningSymbols(std::set<std::string>& symbols,
result.insert(mp);
// Remove the symbol now that its been resolved, being careful to
// not invalidate our iterator.
std::set<std::string>::iterator save = I;
++I;
symbols.erase(save);
// post-increment the iterator.
symbols.erase(I++);
} else {
++I;
}