From 2ddd8e0d871ec1c374ea52ddd5a331015cef6006 Mon Sep 17 00:00:00 2001 From: Jeremy Siek Date: Fri, 18 May 2001 22:47:04 +0000 Subject: [PATCH] fixed color comparison [SVN r10139] --- include/boost/graph/breadth_first_search.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/boost/graph/breadth_first_search.hpp b/include/boost/graph/breadth_first_search.hpp index 8b475c1a..6338e115 100644 --- a/include/boost/graph/breadth_first_search.hpp +++ b/include/boost/graph/breadth_first_search.hpp @@ -139,7 +139,8 @@ namespace boost { Edge e = *ei; vis.examine_edge(e, g); Vertex v = target(e, g); - if (get(color, v) == Color::white()) { + ColorValue v_color = get(color, v); + if (v_color == Color::white()) { vis.tree_edge(e, g); put(color, v, Color::gray()); vis.discover_vertex(v, g); @@ -147,7 +148,7 @@ namespace boost { } else { vis.non_tree_edge(e, g); - if (get(color, v) == Color::gray()) + if (v_color == Color::gray()) vis.gray_target(e, g); else vis.black_target(e, g);