Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Constify pointer and reference local variables in teshsuite/.
[simgrid.git] / teshsuite / simdag / flatifier / flatifier.cpp
index da1a39a..338f43b 100644 (file)
@@ -121,10 +121,10 @@ static void dump_routes()
             });
 
   for (unsigned int it_src = 0; it_src < totalHosts; it_src++) { // Routes from host
-    simgrid::s4u::Host* host1               = hosts[it_src];
+    const simgrid::s4u::Host* host1         = hosts[it_src];
     simgrid::kernel::routing::NetPoint* src = host1->get_netpoint();
     for (unsigned int it_dst = 0; it_dst < totalHosts; it_dst++) { // Routes to host
-      simgrid::s4u::Host* host2 = hosts[it_dst];
+      const simgrid::s4u::Host* host2 = hosts[it_dst];
       std::vector<simgrid::kernel::resource::LinkImpl*> route;
       simgrid::kernel::routing::NetPoint* dst = host2->get_netpoint();
       simgrid::kernel::routing::NetZoneImpl::get_global_route(src, dst, route, nullptr);
@@ -161,7 +161,7 @@ static void dump_routes()
         }
       }
       for (unsigned int it_dst = 0; it_dst < totalHosts; it_dst++) { // Routes to host
-        simgrid::s4u::Host* host2 = hosts[it_dst];
+        const simgrid::s4u::Host* host2 = hosts[it_dst];
         std::printf("  <route src=\"%s\" dst=\"%s\">\n  ", value1->get_cname(), host2->get_cname());
         std::vector<simgrid::kernel::resource::LinkImpl*> route;
         simgrid::kernel::routing::NetPoint* netcardDst = host2->get_netpoint();