mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 21:00:17 +02:00
Merge pull request #3632 from pmatos/RemoveBlocks
Use erase-remove idiom to remove element
This commit is contained in:
1 file changed
+2
-1
@@ -243,7 +243,8 @@ bool RAValidation::Run(IREmitter* IREmit) {
|
||||
|
||||
if (IsFowardsEdge(PredecessorID) && !HaveState) {
|
||||
// We are probably about to visit this node anyway, remove it
|
||||
std::remove(BlocksToVisit.begin(), BlocksToVisit.end(), Predecessor);
|
||||
auto it = std::remove(BlocksToVisit.begin(), BlocksToVisit.end(), Predecessor);
|
||||
BlocksToVisit.erase(it, BlocksToVisit.end());
|
||||
|
||||
// Add the missing predecessor to start of queue
|
||||
BlocksToVisit.push_front(Predecessor);
|
||||
|
||||
Reference in new issue
Block a user