Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix clang build
[simgrid.git] / examples / s4u / actions-comm / s4u_actions-comm.cpp
index 44b42d1..bb7db5d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2016. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2009-2017. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -64,7 +64,7 @@ public:
     simgrid::s4u::MailboxPtr to = simgrid::s4u::Mailbox::byName(simgrid::s4u::this_actor::name() + "_" + action[2]);
     ACT_DEBUG("Entering Send: %s (size: %g) -- Actor %s on mailbox %s", NAME, size,
               simgrid::s4u::this_actor::name().c_str(), to->name());
-    simgrid::s4u::this_actor::send(to, payload, size);
+    to->send(payload, size);
     xbt_free(payload);
 
     log_action(action, simgrid::s4u::Engine::getClock() - clock);
@@ -77,7 +77,7 @@ public:
         simgrid::s4u::Mailbox::byName(std::string(action[2]) + "_" + simgrid::s4u::this_actor::name());
 
     ACT_DEBUG("Receiving: %s -- Actor %s on mailbox %s", NAME, simgrid::s4u::this_actor::name().c_str(), from->name());
-    simgrid::s4u::this_actor::recv(from);
+    from->recv();
     log_action(action, simgrid::s4u::Engine::getClock() - clock);
   }
 };
@@ -117,5 +117,6 @@ int main(int argc, char *argv[])
 
   XBT_INFO("Simulation time %g", e->getClock());
 
+  delete e;
   return 0;
 }