From: Gabriel Corona Date: Mon, 23 May 2016 08:04:19 +0000 (+0200) Subject: [s4u] Use std::function instead of std::function X-Git-Tag: v3_14~1179 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/616ba5a6c0390b7fd7b8dbd5849e4eb236c16c3c [s4u] Use std::function instead of std::function We don't do anything with the int result anyway. --- diff --git a/include/simgrid/s4u/actor.hpp b/include/simgrid/s4u/actor.hpp index a58eb6ccd3..d3dd8ebc35 100644 --- a/include/simgrid/s4u/actor.hpp +++ b/include/simgrid/s4u/actor.hpp @@ -42,12 +42,12 @@ namespace s4u { XBT_PUBLIC_CLASS Actor { Actor(smx_process_t smx_proc); public: - Actor(const char* name, s4u::Host *host, double killTime, std::function code); - Actor(const char* name, s4u::Host *host, std::function code) + Actor(const char* name, s4u::Host *host, double killTime, std::function code); + Actor(const char* name, s4u::Host *host, std::function code) : Actor(name, host, -1, std::move(code)) {}; template Actor(const char* name, s4u::Host *host, C code) - : Actor(name, host, -1, std::function(std::move(code))) {} + : Actor(name, host, -1, std::function(std::move(code))) {} ~Actor(); /** Retrieves the actor that have the given PID (or NULL if not existing) */ diff --git a/src/s4u/s4u_actor.cpp b/src/s4u/s4u_actor.cpp index b888d9b770..0e82ceeaf6 100644 --- a/src/s4u/s4u_actor.cpp +++ b/src/s4u/s4u_actor.cpp @@ -18,7 +18,7 @@ using namespace simgrid; s4u::Actor::Actor(smx_process_t smx_proc) : pimpl_(smx_proc) {} -s4u::Actor::Actor(const char* name, s4u::Host *host, double killTime, std::function code) +s4u::Actor::Actor(const char* name, s4u::Host *host, double killTime, std::function code) { // TODO, when autorestart is used, the std::function is copied so the new // instance will get a fresh (reinitialized) state. Is this what we want?