Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines.
[simgrid.git] / src / kernel / routing / DijkstraZone.cpp
index 2fa52db..3c3378d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2009-2021. The SimGrid Team. All rights reserved.          */
 
 /* 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. */
@@ -129,7 +129,7 @@ void DijkstraZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationAr
     int nr_nodes      = xbt_dynar_length(nodes);
     std::vector<double> cost_arr(nr_nodes); /* link cost from src to other hosts */
     pred_arr.resize(nr_nodes);              /* predecessors in path from src */
-    typedef std::pair<double, int> Qelt;
+    using Qelt = std::pair<double, int>;
     std::priority_queue<Qelt, std::vector<Qelt>, std::greater<>> pqueue;
 
     /* initialize */
@@ -227,12 +227,10 @@ void DijkstraZone::add_route(NetPoint* src, NetPoint* dst, NetPoint* gw_src, Net
 {
   add_route_check_params(src, dst, gw_src, gw_dst, link_list, symmetrical);
 
-  new_edge(src->id(), dst->id(),
-           new_extended_route(hierarchy_, src, dst, gw_src, gw_dst, link_list, symmetrical, true));
+  new_edge(src->id(), dst->id(), new_extended_route(hierarchy_, gw_src, gw_dst, link_list, true));
 
-  if (symmetrical == true)
-    new_edge(dst->id(), src->id(),
-             new_extended_route(hierarchy_, dst, src, gw_dst, gw_src, link_list, symmetrical, false));
+  if (symmetrical)
+    new_edge(dst->id(), src->id(), new_extended_route(hierarchy_, gw_dst, gw_src, link_list, false));
 }
 
 void DijkstraZone::new_edge(int src_id, int dst_id, RouteCreationArgs* route)