Fix the replace method to assert if an item was erased from the set but not

found in the vector. Previously, it just ignored this condition.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16296 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2004-09-11 20:38:25 +00:00
parent 66e7cd0eea
commit 70e2d38361

View File

@ -113,8 +113,8 @@ public:
void remove(const value_type& X) {
if (0 < set_.erase(X)) {
iterator I = find(vector_.begin(),vector_.end(),X);
if (I != vector_.end())
vector_.erase(I);
assert(I != vector_.end() && "Corrupted SetVector instances!");
vector_.erase(I);
}
}