- xbt_dynar_foreach(xbt_graph_node_get_outedges(v_node), cursor, edge) {
- xbt_node_t u_node = xbt_graph_edge_get_target(edge);
- graph_node_data_t data = (graph_node_data_t) xbt_graph_node_get_data(u_node);
- int u_id = data->graph_id;
- sg_platf_route_cbarg_t tmp_e_route = (sg_platf_route_cbarg_t) xbt_graph_edge_get_data(edge);
- int cost_v_u = tmp_e_route->link_list->size(); /* count of links, old model assume 1 */
-
- if (cost_v_u + cost_arr[*v_id] < cost_arr[u_id]) {
- pred_arr[u_id] = *v_id;
- cost_arr[u_id] = cost_v_u + cost_arr[*v_id];
- int *nodeid = xbt_new0(int, 1);
- *nodeid = u_id;
- xbt_heap_push(pqueue, nodeid, cost_arr[u_id]);
+ xbt_dynar_foreach (xbt_graph_node_get_outedges(v_node), cursor, edge) {
+ xbt_node_t u_node = xbt_graph_edge_get_target(edge);
+ graph_node_data_t data = static_cast<graph_node_data_t>(xbt_graph_node_get_data(u_node));
+ int u_id = data->graph_id;
+ RouteCreationArgs* tmp_e_route = static_cast<RouteCreationArgs*>(xbt_graph_edge_get_data(edge));
+ int cost_v_u = tmp_e_route->link_list.size(); /* count of links, old model assume 1 */
+
+ if (cost_v_u + cost_arr[v_id] < cost_arr[u_id]) {
+ pred_arr[u_id] = v_id;
+ cost_arr[u_id] = cost_v_u + cost_arr[v_id];
+ pqueue.emplace(cost_arr[u_id], u_id);