mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 00:32:55 +00:00
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:
parent
66e7cd0eea
commit
70e2d38361
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user