mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix BFS visit
This commit is contained in:
parent
f03245d473
commit
5f39662235
@ -106,11 +106,11 @@ struct BreadthFirstSearch
|
|||||||
V v = std::move(verticesToTraverse.front());
|
V v = std::move(verticesToTraverse.front());
|
||||||
verticesToTraverse.pop_front();
|
verticesToTraverse.pop_front();
|
||||||
|
|
||||||
visited.insert(v);
|
if (!visited.insert(v).second)
|
||||||
|
continue;
|
||||||
|
|
||||||
_forEachChild(v, [this](V _vertex) {
|
_forEachChild(v, [this](V _vertex) {
|
||||||
if (!visited.count(_vertex))
|
verticesToTraverse.emplace_back(std::move(_vertex));
|
||||||
verticesToTraverse.emplace_back(std::move(_vertex));
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
|
Loading…
Reference in New Issue
Block a user