if (e_route != nullptr) {
res->gw_src = e_route->gw_src;
res->gw_dst = e_route->gw_dst;
- for (auto link : *e_route->link_list) {
+ for (auto const& link : *e_route->link_list) {
res->link_list->push_back(link);
if (lat)
*lat += link->latency();
route->gw_src = route->gw_dst;
route->gw_dst = gw_tmp;
}
- if (route->gw_dst) // inter-zone route (to adapt the error message, if any)
+ if (route->gw_dst && route->gw_src) // inter-zone route (to adapt the error message, if any)
xbt_assert(
nullptr == TO_ROUTE_FULL(dst->id(), src->id()),
"The route between %s@%s and %s@%s already exists. You should not declare the reverse path as symmetrical.",