pgRouting

Changeset 23

Show
Ignore:
Timestamp:
08/03/07 09:51:04 (1 year ago)
Author:
anton
Message:

Segfault bug fixed (see Tickets #19 and #16)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/shooting_star_boost_wrapper.cpp

    r22 r23  
    5252 
    5353  default_color_type color; 
     54   
     55  std::size_t index; 
    5456 
    5557  adjacency_list_traits<vecS, vecS, directedS>::edge_descriptor predecessor; 
     
    126128 
    127129  tie(e, inserted) = add_edge(source, target, graph); 
    128    
     130 
    129131  graph[e].cost = cost; 
    130132  graph[e].id = id; 
     133 
     134//  put(edge_index, graph, graph[e], id); 
    131135   
    132136  graph[e].source = source; 
     
    157161 
    158162  typedef adjacency_list<vecS, vecS, directedS, Vertex, Edge> graph_t; 
    159  
     163   
    160164  typedef graph_traits < graph_t >::vertex_descriptor vertex_descriptor; 
    161165  typedef graph_traits < graph_t >::edge_descriptor edge_descriptor; 
     
    257261   
    258262  graph_traits<graph_t>::edge_iterator ei, ei_end; 
     263  int index;     
     264 
     265  index = 1; 
     266   
     267  for(tie(ei, ei_end) = edges(graph); ei != ei_end; ++ei, ++index) 
     268    graph[*ei].index = index;     
    259269     
    260270  for(tie(ei, ei_end) = edges(graph); ei != ei_end; ++ei)  
     
    296306  property_map<graph_t, std::vector< int > Edge::*>::type history = get(&Edge::history, graph); 
    297307 
    298   property_map<graph_t, int Edge::*>::type edge_index = get(&Edge::id, graph); 
     308  property_map<graph_t, std::size_t Edge::*>::type edge_index = get(&Edge::index, graph); 
    299309 
    300310  property_map<graph_t, float8 Edge::*>::type rank = get(&Edge::rank, graph);