From: Martin Quinson Date: Sun, 14 Feb 2016 11:20:17 +0000 (+0100) Subject: Dijkstra: kill obscure dead dupplicated code X-Git-Tag: v3_13~835 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/22e742fb266e0bfa912d5b1ad8768ac8385367fc Dijkstra: kill obscure dead dupplicated code --- diff --git a/src/surf/surf_routing_dijkstra.cpp b/src/surf/surf_routing_dijkstra.cpp index abb0ae2f27..837d770e99 100644 --- a/src/surf/surf_routing_dijkstra.cpp +++ b/src/surf/surf_routing_dijkstra.cpp @@ -376,32 +376,6 @@ AsDijkstra::AsDijkstra(const char*name, bool cached) p_routeCache = xbt_dict_new_homogeneous(&route_cache_elem_free); } -void AsDijkstra::end() -{ - xbt_node_t node = NULL; - unsigned int cursor2; - xbt_dynar_t nodes = NULL; - - /* Create the topology graph */ - if(!p_routeGraph) - p_routeGraph = xbt_graph_new_graph(1, NULL); - if(!p_graphNodeMap) - p_graphNodeMap = xbt_dict_new_homogeneous(&graph_node_map_elem_free); - - /* Add the loopback if needed */ - if (routing_platf->p_loopback && hierarchy_ == SURF_ROUTING_BASE) - addLoopback(); - - /* initialize graph indexes in nodes after graph has been built */ - nodes = xbt_graph_get_nodes(p_routeGraph); - - xbt_dynar_foreach(nodes, cursor2, node) { - graph_node_data_t data = (graph_node_data_t) xbt_graph_node_get_data(node); - data->graph_id = cursor2; - } - -} - void AsDijkstra::parseRoute(sg_platf_route_cbarg_t route) { char *src = (char*)(route->src); diff --git a/src/surf/surf_routing_dijkstra.hpp b/src/surf/surf_routing_dijkstra.hpp index f30bf38fb9..7e3b8ffa85 100644 --- a/src/surf/surf_routing_dijkstra.hpp +++ b/src/surf/surf_routing_dijkstra.hpp @@ -61,7 +61,6 @@ public: void getRouteAndLatency(sg_platf_route_cbarg_t route, double *lat); // FIXME: this function is dangerously not overriding because of diverging prototype xbt_dynar_t getOneLinkRoutes() override; void parseRoute(sg_platf_route_cbarg_t route) override; - void end(); xbt_graph_t p_routeGraph = nullptr; /* xbt_graph */ xbt_dict_t p_graphNodeMap = nullptr; /* map */