From bb38818fef8e6dd05e4c17c1b795952fec9b3776 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Wed, 15 Aug 2018 01:49:06 +0200 Subject: [PATCH 1/1] this name is not explicit, thus this type is not helping. Thus removing --- include/simgrid/s4u/Actor.hpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/simgrid/s4u/Actor.hpp b/include/simgrid/s4u/Actor.hpp index 026b326dd4..6ee97c4ab3 100644 --- a/include/simgrid/s4u/Actor.hpp +++ b/include/simgrid/s4u/Actor.hpp @@ -131,8 +131,6 @@ class XBT_PUBLIC Actor : public simgrid::xbt::Extendable { explicit Actor(smx_actor_t pimpl) : pimpl_(pimpl) {} - typedef std::function 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 code); /** Create an actor from a std::function * @@ -176,7 +174,7 @@ public: */ template 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(std::move(code))); } /** Create an actor using a callable thing and its arguments. -- 2.20.1