if (not dst->isRouter()) { // No specific link for router
std::pair<surf::LinkImpl*, surf::LinkImpl*> info =
- privateLinks_.at(dst->id() * linkCountPerNode_ + hasLoopback_ + hasLimiter_);
+ privateLinks_.at(dst->id() * linkCountPerNode_ + (hasLoopback_ ? 1 : 0) + (hasLimiter_ ? 1 : 0));
if (info.second) { // link down
route->link_list->push_back(info.second);
if (lat)
*lat += info.second->latency();
}
if (hasLimiter_) { // limiter for receiver
- info = privateLinks_.at(dst->id() * linkCountPerNode_ + hasLoopback_);
+ info = privateLinks_.at(dst->id() * linkCountPerNode_ + (hasLoopback_ ? 1 : 0));
route->link_list->push_back(info.first);
}
}
new_xbt_graph_edge(graph, routerNode, backboneNode, edges);
}
- for (auto src : getVertices()) {
+ for (auto const& src : getVertices()) {
if (not src->isRouter()) {
xbt_node_t previous = new_xbt_graph_node(graph, src->cname(), nodes);