Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use typed Mailbox::get<>() instead of using static_cast everywhere.
[simgrid.git] / docs / source / tuto_s4u / master-workers-lab3.cpp
index 30619422603cbdabcdf320a8c780aa920589689b..a2f3963a97ef9a229f40e4b941d9691f9e109c38 100644 (file)
@@ -22,7 +22,7 @@ static void worker()
   simgrid::s4u::Mailbox* mailbox   = simgrid::s4u::Mailbox::by_name(mailbox_name);
 
   while (true) { // Master forcefully kills the workers by the end of the simulation
-    double* msg  = static_cast<double*>(mailbox->get());
+    double* msg         = mailbox->get<double>();
     double compute_cost = *msg;
     delete msg;