Skip to content

Commit a05e5ab

Browse files
author
Roland Leißa
committed
bug fix: setting of exit
1 parent 0548dce commit a05e5ab

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/graphtool/graph.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@ Graph::~Graph() {
99
}
1010

1111
Graph::Node* Graph::node(Sym name) {
12-
if (auto i = nodes_.find(name); i != nodes_.end()) return i->second;
12+
if (auto i = nodes_.find(name); i != nodes_.end()) return exit_ = i->second;
1313
auto node = new Node(name);
1414
if (entry_ == nullptr) entry_ = node;
15-
exit_ = node;
1615
auto [_, ins] = nodes_.emplace(name, node);
1716
assert_unused(ins);
18-
return node;
17+
return exit_ = node;
1918
}
2019

2120
void Graph::critical_edge_elimination() {

0 commit comments

Comments
 (0)