X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3ce054415500e2f9b7ebf726c9f22446f5ec39f3..8cd2b8b1e341896e2b8c3e96eb3778316855504c:/examples/s4u/app-token-ring/s4u-app-token-ring.cpp diff --git a/examples/s4u/app-token-ring/s4u-app-token-ring.cpp b/examples/s4u/app-token-ring/s4u-app-token-ring.cpp index a5c3d7fa4a..ce84f9c540 100644 --- a/examples/s4u/app-token-ring/s4u-app-token-ring.cpp +++ b/examples/s4u/app-token-ring/s4u-app-token-ring.cpp @@ -55,22 +55,21 @@ public: int main(int argc, char** argv) { - simgrid::s4u::Engine* e = new simgrid::s4u::Engine(&argc, argv); + simgrid::s4u::Engine e(&argc, argv); xbt_assert(argc > 1, "Usage: %s platform.xml\n", argv[0]); - e->loadPlatform(argv[1]); + e.loadPlatform(argv[1]); - XBT_INFO("Number of hosts '%zu'", e->getHostCount()); + XBT_INFO("Number of hosts '%zu'", e.getHostCount()); int id = 0; std::vector list; - e->getHostList(&list); + e.getHostList(&list); for (auto const& host : list) { /* - Give a unique rank to each host and create a @ref relay_runner process on each */ simgrid::s4u::Actor::createActor((std::to_string(id)).c_str(), host, RelayRunner()); id++; } - e->run(); - XBT_INFO("Simulation time %g", e->getClock()); + e.run(); + XBT_INFO("Simulation time %g", e.getClock()); - delete e; return 0; }