Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use typed Mailbox::get<>() instead of using static_cast everywhere.
[simgrid.git] / examples / smpi / smpi_s4u_masterworker / masterworker_mailbox_smpi.cpp
index c81e697ed6b5731fe08e7f7a5e04630f47cc66d6..5c120428bae89efa5433e66f510fa4b8786b3345 100644 (file)
@@ -51,7 +51,7 @@ static void worker(std::vector<std::string> args)
 
   double compute_cost;
   do {
-    const auto* msg   = static_cast<double*>(mailbox->get());
+    const auto* msg   = mailbox->get<double>();
     compute_cost      = *msg;
     delete msg;