Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
new MANIFEST.in after adding ns3 wifi
[simgrid.git] / examples / s4u / mc-bugged1 / s4u-mc-bugged1.cpp
index 802403d2e0b01c481c0342115cb479c82e3ad319..e642594ffa8b2928372480c0683299642717a5c0 100644 (file)
@@ -11,7 +11,7 @@
 #include <simgrid/modelchecker.h>
 #include <simgrid/s4u.hpp>
 
-#define N 3
+constexpr int N = 3;
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(example, "this example");
 
@@ -35,8 +35,7 @@ static void server()
 
 static void client(int id)
 {
-  int* payload = new int();
-  *payload     = id;
+  auto* payload = new int(id);
   simgrid::s4u::Mailbox::by_name("mymailbox")->put(payload, 10000);
 
   XBT_INFO("Sent!");