Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines for 2022.
[simgrid.git] / examples / cpp / plugin-prodcons / s4u-plugin-prodcons.cpp
index 0ad772e..6ef625f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2022. 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. */
@@ -65,8 +65,8 @@ int main(int argc, char* argv[])
     std::string linkname = std::string("cluster") + "_link_" + std::to_string(i);
     const auto* link     = cluster->create_split_duplex_link(linkname, "1Gbps");
 
-    cluster->add_route(host->get_netpoint(), nullptr, nullptr, nullptr,
-                       std::vector<sg4::LinkInRoute>{{link, sg4::LinkInRoute::Direction::UP}}, true);
+    cluster->add_route(host->get_netpoint(), nullptr, nullptr, nullptr, {{link, sg4::LinkInRoute::Direction::UP}},
+                       true);
   }
 
   auto* router = cluster->create_router("cluster_router");
@@ -79,10 +79,10 @@ int main(int argc, char* argv[])
 
   for (int i = 0; i < 3; i++) {
     std::string hostname = std::string("node-") + std::to_string(i) + ".simgrid.org";
-    sg4::Actor::create("ingester-" + std::to_string(i), sg4::Host::by_name(hostname), &ingester, i, pc);
+    sg4::Actor::create("ingester-" + std::to_string(i), e.host_by_name(hostname), &ingester, i, pc);
 
     hostname = std::string("node-") + std::to_string(i + 3) + ".simgrid.org";
-    sg4::Actor::create("retriever-" + std::to_string(i), sg4::Host::by_name(hostname), &retriever, pc);
+    sg4::Actor::create("retriever-" + std::to_string(i), e.host_by_name(hostname), &retriever, pc);
   }
 
   e.run();