Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62693 - trunk/boost/graph
From: jewillco_at_[hidden]
Date: 2010-06-09 17:11:44


Author: jewillco
Date: 2010-06-09 17:11:43 EDT (Wed, 09 Jun 2010)
New Revision: 62693
URL: http://svn.boost.org/trac/boost/changeset/62693

Log:
Swapped order of visitor calls; fixes #3137
Text files modified:
   trunk/boost/graph/breadth_first_search.hpp | 5 +++--
   1 files changed, 3 insertions(+), 2 deletions(-)

Modified: trunk/boost/graph/breadth_first_search.hpp
==============================================================================
--- trunk/boost/graph/breadth_first_search.hpp (original)
+++ trunk/boost/graph/breadth_first_search.hpp 2010-06-09 17:11:43 EDT (Wed, 09 Jun 2010)
@@ -76,8 +76,9 @@
       for (tie(ei, ei_end) = out_edges(u, g); ei != ei_end; ++ei) {
         Vertex v = target(*ei, g); vis.examine_edge(*ei, g);
         ColorValue v_color = get(color, v);
- if (v_color == Color::white()) { vis.tree_edge(*ei, g);
- put(color, v, Color::gray()); vis.discover_vertex(v, g);
+ if (v_color == Color::white()) { vis.discover_vertex(v, g);
+ vis.tree_edge(*ei, g);
+ put(color, v, Color::gray());
           Q.push(v);
         } else { vis.non_tree_edge(*ei, g);
           if (v_color == Color::gray()) vis.gray_target(*ei, g);


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk