Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Give a way to add binaries to the list that shouldn't be messed with by sthread
[simgrid.git] / examples / cpp / dag-from-dax-simple / s4u-dag-from-dax-simple.cpp
index 950cd77867f0c81e3c93d498e3a6b0f77fe0163f..aa8e17d8a042642f4564f048ca232e95502cad04 100644 (file)
@@ -26,8 +26,8 @@ int main(int argc, char* argv[])
 
   for (const auto& a : dag) {
     if (auto* comm = dynamic_cast<simgrid::s4u::Comm*>(a.get())) {
-      auto pred = dynamic_cast<simgrid::s4u::Exec*>((*comm->get_dependencies().begin()).get());
-      auto succ = dynamic_cast<simgrid::s4u::Exec*>(comm->get_successors().front().get());
+      const auto* pred = dynamic_cast<simgrid::s4u::Exec*>((*comm->get_dependencies().begin()).get());
+      const auto* succ = dynamic_cast<simgrid::s4u::Exec*>(comm->get_successors().front().get());
       comm->set_source(pred->get_host())->set_destination(succ->get_host());
     }
   }