]> AND Public Git Repository - simgrid.git/blobdiff - teshsuite/s4u/host-on-off-recv/host-on-off-recv.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use typed Mailbox::get<>() instead of using static_cast everywhere.
[simgrid.git] / teshsuite / s4u / host-on-off-recv / host-on-off-recv.cpp
index 69f62bfe74fbf1e45eb063b09dc249498af3cd18..bb98a892159fd9bce45e5f1952387da460d42646 100644 (file)
@@ -40,7 +40,7 @@ static void worker()
 
   XBT_INFO("Worker receiving");
   try {
-    payload = static_cast<std::string*>(mailbox->get());
+    payload = mailbox->get<std::string>();
   } catch (const simgrid::HostFailureException&) {
     XBT_DEBUG("The host has been turned off, this was expected");
     delete payload;