Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use typed Mailbox::get<>() instead of using static_cast everywhere.
[simgrid.git] / examples / s4u / mc-failing-assert / s4u-mc-failing-assert.cpp
index fb78611cee0fcb21d9f24dfcb7944c041b3aaa68..aaeb29babf8456757bf090e7bfe3070942a15068 100644 (file)
@@ -18,7 +18,7 @@ static int server(int worker_amount)
   int value_got             = -1;
   simgrid::s4u::Mailbox* mb = simgrid::s4u::Mailbox::by_name("server");
   for (int count = 0; count < worker_amount; count++) {
-    const auto* msg = static_cast<int*>(mb->get());
+    const auto* msg = mb->get<int>();
     value_got = *msg;
     delete msg;
   }