A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More references for parameters of type std::function.
[simgrid.git]
/
src
/
s4u
/
s4u_Actor.cpp
diff --git
a/src/s4u/s4u_Actor.cpp
b/src/s4u/s4u_Actor.cpp
index
b97212a
..
6cd3ede
100644
(file)
--- a/
src/s4u/s4u_Actor.cpp
+++ b/
src/s4u/s4u_Actor.cpp
@@
-47,16
+47,15
@@
ActorPtr Actor::init(std::string name, s4u::Host* host)
return actor->ciface();
}
return actor->ciface();
}
-ActorPtr Actor::start(
std::function<void()>
code)
+ActorPtr Actor::start(
const std::function<void()>&
code)
{
{
- simgrid::simix::simcall([this, code] { pimpl_->start(code); });
+ simgrid::simix::simcall([this,
&
code] { pimpl_->start(code); });
return this;
}
return this;
}
-ActorPtr Actor::create(std::string name, s4u::Host* host,
std::function<void()>
code)
+ActorPtr Actor::create(std::string name, s4u::Host* host,
const std::function<void()>&
code)
{
{
- simgrid::kernel::actor::ActorImpl* actor =
- simcall_process_create(std::move(name), std::move(code), nullptr, host, nullptr);
+ simgrid::kernel::actor::ActorImpl* actor = simcall_process_create(std::move(name), code, nullptr, host, nullptr);
return actor->iface();
}
return actor->iface();
}