X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e53e94eb6cb9f8edda78234ec8a0ba7880431d2a..78cf63c4e0797bb270e0e809f7cb41d9d598c214:/src/kernel/routing/FloydZone.cpp diff --git a/src/kernel/routing/FloydZone.cpp b/src/kernel/routing/FloydZone.cpp index 76411b2600..e48a460856 100644 --- a/src/kernel/routing/FloydZone.cpp +++ b/src/kernel/routing/FloydZone.cpp @@ -53,7 +53,7 @@ void FloydZone::get_local_route(const NetPoint* src, const NetPoint* dst, Route* route->gw_dst_ = route_stack.front()->gw_dst_; } - NetPoint* prev_dst_gw = nullptr; + const NetPoint* prev_dst_gw = nullptr; while (not route_stack.empty()) { const Route* e_route = route_stack.back(); route_stack.pop_back(); @@ -62,11 +62,7 @@ void FloydZone::get_local_route(const NetPoint* src, const NetPoint* dst, Route* get_global_route(prev_dst_gw, e_route->gw_src_, route->link_list_, lat); } - for (auto const& link : e_route->link_list_) { - route->link_list_.push_back(link); - if (lat) - *lat += link->get_latency(); - } + add_link_latency(route->link_list_, e_route->link_list_, lat); prev_dst_gw = e_route->gw_dst_; }