Skip to content
Snippets Groups Projects
Commit d3ecc2c4 authored by Marcus D. Hanwell's avatar Marcus D. Hanwell
Browse files

BUG: 12772 fixes for change in Boost graph API

This fixes bug 12772, where an API change in Boost was causing
compilation failures using Boost 1.38. Thanks to Orion Poplawski for
reporting the issue and posting the patch.

Change-Id: I491b0f1650c0be19319533306eb10597dc96fa06
parent 2f9c8427
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,15 @@ using namespace boost;
vtkStandardNewMacro(vtkBoostBreadthFirstSearchTree);
namespace {
vtkIdType unwrap_edge_id(vtkEdgeType const &e) {
return e.Id;
}
vtkIdType unwrap_edge_id(boost::detail::reverse_graph_edge_descriptor<vtkEdgeType> const &e) {
return e.underlying_desc.Id;
}
}
// Redefine the bfs visitor, the only visitor we
// are using is the tree_edge visitor.
template <typename IdMap>
......@@ -95,7 +104,8 @@ public:
// Copy the vertex and edge data from the graph to the tree.
tree->GetVertexData()->CopyData(graph->GetVertexData(), v, tree_v);
tree->GetEdgeData()->CopyData(graph->GetEdgeData(), e.Id, tree_e.Id);
tree->GetEdgeData()->CopyData(graph->GetEdgeData(),
unwrap_edge_id(e), tree_e.Id);
}
private:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment