From 2b0590f9bdc3b84c242ec4cc0cd6c71a06d8e110 Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Mon, 24 Jun 2013 16:55:43 -0400 Subject: [PATCH] Remove GUARANTEE macro --- DataStructures/DynamicGraph.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/DataStructures/DynamicGraph.h b/DataStructures/DynamicGraph.h index 6730babdf..abc238e27 100644 --- a/DataStructures/DynamicGraph.h +++ b/DataStructures/DynamicGraph.h @@ -55,8 +55,7 @@ class DynamicGraph { m_edges.resize( m_numNodes ); } template - DynamicGraph( const int nodes, const ContainerT &graph ) - { + DynamicGraph( const int nodes, const ContainerT &graph ) { m_numNodes = nodes; m_numEdges = ( EdgeIterator ) graph.size(); m_nodes.reserve( m_numNodes +1); @@ -80,7 +79,10 @@ class DynamicGraph { for ( EdgeIterator i = m_nodes[node].firstEdge, e = m_nodes[node].firstEdge + m_nodes[node].edges; i != e; ++i ) { m_edges[i].target = graph[edge].target; m_edges[i].data = graph[edge].data; - GUARANTEE(graph[edge].data.distance > 0, "edge: " << edge << "(" << graph[edge].source << "," << graph[edge].target << ")=" << graph[edge].data.distance); + BOOST_ASSERT_MSG( + graph[edge].data.distance > 0, + "edge distance invalid" + ); ++edge; } } @@ -88,13 +90,11 @@ class DynamicGraph { ~DynamicGraph(){ } - unsigned GetNumberOfNodes() const - { + unsigned GetNumberOfNodes() const { return m_numNodes; } - unsigned GetNumberOfEdges() const - { + unsigned GetNumberOfEdges() const { return m_numEdges; }