Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
constify
[simgrid.git] / src / kernel / routing / TorusZone.cpp
index 1663e31..5c9a239 100644 (file)
@@ -25,7 +25,6 @@ void TorusZone::create_links_for_node(ClusterCreationArgs* cluster, int id, int
   int dim_product = 1; // Needed to calculate the next neighbor_id
 
   for (unsigned int j = 0; j < dimensions_.size(); j++) {
-    LinkCreationArgs link;
     int current_dimension = dimensions_[j]; // which dimension are we currently in?
                                             // we need to iterate over all dimensions and create all links there
     // The other node the link connects
@@ -35,8 +34,8 @@ void TorusZone::create_links_for_node(ClusterCreationArgs* cluster, int id, int
     // name of neighbor is not right for non contiguous cluster radicals (as id != rank in this case)
     std::string link_id =
         std::string(cluster->id) + "_link_from_" + std::to_string(id) + "_to_" + std::to_string(neighbor_rank_id);
-    s4u::Link* linkup;
-    s4u::Link* linkdown;
+    const s4u::Link* linkup;
+    const s4u::Link* linkdown;
     if (cluster->sharing_policy == s4u::Link::SharingPolicy::SPLITDUPLEX) {
       linkup   = create_link(link_id + "_UP", std::vector<double>{cluster->bw})->set_latency(cluster->lat)->seal();
       linkdown = create_link(link_id + "_DOWN", std::vector<double>{cluster->bw})->set_latency(cluster->lat)->seal();