]> AND Public Git Repository - simgrid.git/blobdiff - teshsuite/s4u/actor-suspend/actor-suspend.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Pull simgrid/master and a subsequent merge
[simgrid.git] / teshsuite / s4u / actor-suspend / actor-suspend.cpp
index 14bf657f9b3f1c82eb7c88ed24fcc07964bc535f..585f564c2f0d8150d8afade33faee9b56912a1e3 100644 (file)
@@ -6,10 +6,10 @@
 // This is the MWE of https://framagit.org/simgrid/simgrid/-/issues/50
 // The problem was occurring when suspending an actor that will be executed later in the same scheduling round
 
+#include <cstdio>
+#include <cstdlib>
 #include <iostream>
 #include <simgrid/s4u.hpp>
-#include <stdio.h>
-#include <stdlib.h>
 #include <vector>
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(mwe, "Minimum Working Example");
@@ -50,15 +50,15 @@ public:
 
 int main(int argc, char** argv)
 {
-  const simgrid::s4u::Engine* engine = new simgrid::s4u::Engine(&argc, argv);
+  simgrid::s4u::Engine engine(&argc, argv);
 
-  engine->load_platform(argv[1]);
+  engine.load_platform(argv[1]);
   simgrid::s4u::Host* host = simgrid::s4u::Host::by_name("Tremblay");
 
   simgrid::s4u::Actor::create("Suspender", host, Suspender());
   receiver = simgrid::s4u::Actor::create("Receiver", host, Receiver());
 
-  engine->run();
+  engine.run();
 
   return 0;
 }