Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
this name is not explicit, thus this type is not helping. Thus removing
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 14 Aug 2018 23:49:06 +0000 (01:49 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 14 Aug 2018 23:49:06 +0000 (01:49 +0200)
include/simgrid/s4u/Actor.hpp

index 026b326..6ee97c4 100644 (file)
@@ -131,8 +131,6 @@ class XBT_PUBLIC Actor : public simgrid::xbt::Extendable<Actor> {
 
   explicit Actor(smx_actor_t pimpl) : pimpl_(pimpl) {}
 
-  typedef std::function<void()> callback_type;
-
 public:
 
   // ***** No copy *****
@@ -168,7 +166,7 @@ public:
    *
    *  If the actor is restarted, the actor has a fresh copy of the function.
    */
-  static ActorPtr create(std::string name, s4u::Host* host, callback_type code);
+  static ActorPtr create(std::string name, s4u::Host* host, std::function<void()> code);
 
   /** Create an actor from a std::function
    *
@@ -176,7 +174,7 @@ public:
    */
   template <class F> static ActorPtr create(std::string name, s4u::Host* host, F code)
   {
-    return create(name, host, callback_type(std::move(code)));
+    return create(name, host, std::function<void()>(std::move(code)));
   }
 
   /** Create an actor using a callable thing and its arguments.