Skip to content

Commit 2aad244

Browse files
Update graph.hpp
1 parent 6549710 commit 2aad244

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

taskflow/graph/graph.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,17 @@ inline Node::~Node() {
7878
std::list<Graph> gs;
7979
gs.push_back(std::move(*_subgraph));
8080
_subgraph.reset();
81-
size_t i=0;
82-
while(i<gs.size()) {
83-
auto n = gs[i].begin();
84-
while(n != gs[i].end()) {
81+
auto i=gs.begin();
82+
while(i!=gs.end()) {
83+
auto n = i->begin();
84+
while(n != i->end()) {
8585
if(n->_subgraph.has_value()) {
86-
gs.push_back(*(n->_subgraph));
86+
gs.push_back(std::move(*(n->_subgraph)));
8787
n->_subgraph.reset();
8888
}
89-
n++;
89+
++n;
9090
}
91-
i++;
91+
++i;
9292
}
9393
}
9494
}

0 commit comments

Comments
 (0)