mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-01 01:26:56 +00:00
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:
@@ -472,10 +472,8 @@ Archive::findModulesDefiningSymbols(std::set<std::string>& symbols,
|
|||||||
result.insert(mp);
|
result.insert(mp);
|
||||||
|
|
||||||
// Remove the symbol now that its been resolved, being careful to
|
// Remove the symbol now that its been resolved, being careful to
|
||||||
// not invalidate our iterator.
|
// post-increment the iterator.
|
||||||
std::set<std::string>::iterator save = I;
|
symbols.erase(I++);
|
||||||
++I;
|
|
||||||
symbols.erase(save);
|
|
||||||
} else {
|
} else {
|
||||||
++I;
|
++I;
|
||||||
}
|
}
|
||||||
|
@@ -472,10 +472,8 @@ Archive::findModulesDefiningSymbols(std::set<std::string>& symbols,
|
|||||||
result.insert(mp);
|
result.insert(mp);
|
||||||
|
|
||||||
// Remove the symbol now that its been resolved, being careful to
|
// Remove the symbol now that its been resolved, being careful to
|
||||||
// not invalidate our iterator.
|
// post-increment the iterator.
|
||||||
std::set<std::string>::iterator save = I;
|
symbols.erase(I++);
|
||||||
++I;
|
|
||||||
symbols.erase(save);
|
|
||||||
} else {
|
} else {
|
||||||
++I;
|
++I;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user