/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
- auto elm = route_cache_.try_emplace(src_id);
- std::vector<unsigned long>& pred_arr = elm.first->second;
+ auto [elm, inserted] = route_cache_.try_emplace(src_id);
+ std::vector<unsigned long>& pred_arr = elm->second;
unsigned long nr_nodes = xbt_dynar_length(nodes);
std::vector<unsigned long> cost_arr(nr_nodes); /* link cost from src to other hosts */
pred_arr.resize(nr_nodes); /* predecessors in path from src */
unsigned long nr_nodes = xbt_dynar_length(nodes);
std::vector<unsigned long> cost_arr(nr_nodes); /* link cost from src to other hosts */
pred_arr.resize(nr_nodes); /* predecessors in path from src */
// Finally add it
xbt_graph_new_edge(route_graph_.get(), src, dst, route);
}
// Finally add it
xbt_graph_new_edge(route_graph_.get(), src, dst, route);
}