Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1188)

Unified Diff: cycle_breaker.cc

Issue 3020026: AU: Fix bug in impl of Johnson's circuit finding algorithm. (Closed) Base URL: ssh://git@chromiumos-git/update_engine.git
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cycle_breaker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cycle_breaker.cc
diff --git a/cycle_breaker.cc b/cycle_breaker.cc
index 6e0689891f615f8d7f220e38f707629c0664a353..0998dac5e7ac89934fbc958abdbf34ea32e6fe16 100644
--- a/cycle_breaker.cc
+++ b/cycle_breaker.cc
@@ -133,7 +133,11 @@ bool CycleBreaker::Circuit(Vertex::Index vertex) {
for (Vertex::SubgraphEdgeMap::iterator w =
subgraph_[vertex].subgraph_edges.begin();
w != subgraph_[vertex].subgraph_edges.end(); ++w) {
- subgraph_[*w].subgraph_edges.insert(vertex);
+ if (blocked_graph_[*w].out_edges.find(vertex) ==
+ blocked_graph_[*w].out_edges.end()) {
+ blocked_graph_[*w].out_edges.insert(make_pair(vertex,
+ EdgeProperties()));
+ }
}
}
CHECK_EQ(vertex, stack_.back());
« no previous file with comments | « no previous file | cycle_breaker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698