Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
No need for reinterpret_cast here.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 5 Dec 2017 22:24:12 +0000 (23:24 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 5 Dec 2017 22:24:12 +0000 (23:24 +0100)
examples/s4u/energy-link/s4u-energy-link.cpp

index 14cf055..3e69b7f 100644 (file)
@@ -54,12 +54,12 @@ static void receiver(std::vector<std::string> args)
     void* res = mailbox->get();
     xbt_free(res);
   } else {
-    char* data[flow_amount];
+    void* data[flow_amount];
 
     // Start all comms in parallel, and wait for their completion in one shot
     std::vector<simgrid::s4u::CommPtr> comms;
     for (int i = 0; i < flow_amount; i++)
-      comms.push_back(mailbox->get_async(reinterpret_cast<void**>(&(data[i]))));
+      comms.push_back(mailbox->get_async(&data[i]));
 
     simgrid::s4u::Comm::wait_all(&comms);
     for (int i = 0; i < flow_amount; i++)