From 6ffc79eca66e8d83b59f5b9c20360519d63e28d7 Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Tue, 24 Mar 2020 16:09:00 +0100 Subject: [PATCH] Fix comparison warning --- BGL/include/CGAL/boost/graph/alpha_expansion_graphcut.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/alpha_expansion_graphcut.h b/BGL/include/CGAL/boost/graph/alpha_expansion_graphcut.h index a1bf464a111..7c7d18b693e 100644 --- a/BGL/include/CGAL/boost/graph/alpha_expansion_graphcut.h +++ b/BGL/include/CGAL/boost/graph/alpha_expansion_graphcut.h @@ -259,7 +259,7 @@ public: { boost::default_color_type color = boost::get(boost::vertex_color, graph, inserted_vertices[vertex_i]); - if(get (vertex_label_map, vd) != alpha + if(std::size_t(get (vertex_label_map, vd)) != alpha && color == ColorTraits::white()) //new comers (expansion occurs) put (vertex_label_map, vd, alpha); } @@ -582,7 +582,7 @@ double alpha_expansion_graphcut (const InputGraph& input_graph, double source_weight = get(vertex_label_cost_map, vd)[alpha]; // since it is expansion move, current alpha labeled vertices will be assigned to alpha again, // making sink_weight 'infinity' guarantee this. - double sink_weight = (get(vertex_label_map, vd) == alpha ? + double sink_weight = (std::size_t(get(vertex_label_map, vd)) == alpha ? (std::numeric_limits::max)() : get(vertex_label_cost_map, vd)[get(vertex_label_map, vd)]);