Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove useless typedef's from C++ files.
[simgrid.git] / src / kernel / routing / FullZone.cpp
index dbb5a80..429f079 100644 (file)
@@ -68,7 +68,7 @@ void FullZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg_
   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();
@@ -106,7 +106,7 @@ void FullZone::addRoute(sg_platf_route_cbarg_t route)
       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.",