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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | cycle_breaker_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "update_engine/cycle_breaker.h" 5 #include "update_engine/cycle_breaker.h"
6 #include <set> 6 #include <set>
7 #include <utility> 7 #include <utility>
8 #include "update_engine/graph_utils.h" 8 #include "update_engine/graph_utils.h"
9 #include "update_engine/tarjan.h" 9 #include "update_engine/tarjan.h"
10 #include "update_engine/utils.h" 10 #include "update_engine/utils.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 found = true; 126 found = true;
127 } 127 }
128 } 128 }
129 129
130 if (found) { 130 if (found) {
131 Unblock(vertex); 131 Unblock(vertex);
132 } else { 132 } else {
133 for (Vertex::SubgraphEdgeMap::iterator w = 133 for (Vertex::SubgraphEdgeMap::iterator w =
134 subgraph_[vertex].subgraph_edges.begin(); 134 subgraph_[vertex].subgraph_edges.begin();
135 w != subgraph_[vertex].subgraph_edges.end(); ++w) { 135 w != subgraph_[vertex].subgraph_edges.end(); ++w) {
136 subgraph_[*w].subgraph_edges.insert(vertex); 136 if (blocked_graph_[*w].out_edges.find(vertex) ==
137 blocked_graph_[*w].out_edges.end()) {
138 blocked_graph_[*w].out_edges.insert(make_pair(vertex,
139 EdgeProperties()));
140 }
137 } 141 }
138 } 142 }
139 CHECK_EQ(vertex, stack_.back()); 143 CHECK_EQ(vertex, stack_.back());
140 stack_.pop_back(); 144 stack_.pop_back();
141 return found; 145 return found;
142 } 146 }
143 147
144 } // namespace chromeos_update_engine 148 } // namespace chromeos_update_engine
OLDNEW
« 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