Skip to content

Commit f593e09

Browse files
use graph traits for number of vertices and edges; use unsigned size_t for loops
1 parent 7850cff commit f593e09

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/boost/graph/adj_list_serialize.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ namespace serialization
4545
{
4646
typedef adjacency_list< OEL, VL, D, VP, EP, GP, EL > Graph;
4747
typedef typename graph_traits< Graph >::vertex_descriptor Vertex;
48-
49-
typedef typename boost::graph_traits<Graph>::vertices_size_type VerticesSize;
48+
typedef typename graph_traits< Graph >::vertices_size_type VerticesSize;
5049

5150
VerticesSize V = num_vertices(graph);
5251
VerticesSize E = num_edges(graph);
@@ -86,10 +85,11 @@ namespace serialization
8685
typedef adjacency_list< OEL, VL, D, VP, EP, GP, EL > Graph;
8786
typedef typename graph_traits< Graph >::vertex_descriptor Vertex;
8887
typedef typename graph_traits< Graph >::edge_descriptor Edge;
88+
typedef typename graph_traits< Graph >::vertices_size_type VerticesSize;
8989

90-
unsigned int V;
90+
VerticesSize V;
9191
ar >> BOOST_SERIALIZATION_NVP(V);
92-
unsigned int E;
92+
VerticesSize E;
9393
ar >> BOOST_SERIALIZATION_NVP(E);
9494

9595
std::vector< Vertex > verts(V);

0 commit comments

Comments
 (0)