Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Clang-tidy: readability-qualified-auto.
[simgrid.git] / examples / cpp / dag-from-dax / s4u-dag-from-dax.cpp
index a6c2538..9c62ac8 100644 (file)
@@ -1,6 +1,6 @@
 /* simple test trying to load a DAX file.                                   */
 
-/* Copyright (c) 2009-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2009-2023. 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. */
@@ -51,8 +51,8 @@ int main(int argc, char** argv)
       cursor++;
     }
     if (auto* comm = dynamic_cast<sg4::Comm*>(a.get())) {
-      auto pred = dynamic_cast<sg4::Exec*>((*comm->get_dependencies().begin()).get());
-      auto succ = dynamic_cast<sg4::Exec*>(comm->get_successors().front().get());
+      const auto* pred = dynamic_cast<sg4::Exec*>((*comm->get_dependencies().begin()).get());
+      const auto* succ = dynamic_cast<sg4::Exec*>(comm->get_successors().front().get());
       comm->set_source(pred->get_host())->set_destination(succ->get_host());
     }
   }