- routing_platf->getRouteAndLatency (src_elm, dst_elm, &route,NULL);
- unsigned int i;
- surf_cpp_resource_t link;
- xbt_dynar_foreach (route, i, link) {
- char *link_name = (char*)surf_resource_name(link);
- instr_user_variable (time, link_name, variable, father_type, value, what, NULL, user_link_variables);
- }
+ std::vector<Link*> *route = new std::vector<Link*>();
+ routing_platf->getRouteAndLatency (src_elm, dst_elm, route,NULL);
+ for (auto link : *route)
+ instr_user_variable (time, link->getName(), variable, father_type, value, what, NULL, user_link_variables);
+ delete route;