X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c1b3e440de2150420b08c0bc55a125a0c9eb86bc..9e3b2f1d55a07271c05db2ed5b3fec27561097f9:/src/s4u/s4u_Actor.cpp diff --git a/src/s4u/s4u_Actor.cpp b/src/s4u/s4u_Actor.cpp index 725cd5f9af..1b92776b39 100644 --- a/src/s4u/s4u_Actor.cpp +++ b/src/s4u/s4u_Actor.cpp @@ -45,7 +45,7 @@ ActorPtr Actor::create(std::string name, s4u::Host* host, std::function return actor->iface(); } -ActorPtr Actor::create(std::string name, s4u::Host* host, std::string function, std::vector args) +ActorPtr Actor::create(std::string name, s4u::Host* host, const std::string& function, std::vector args) { simgrid::simix::ActorCodeFactory& factory = SIMIX_get_actor_code_factory(function); return create(std::move(name), host, factory(std::move(args))); @@ -228,12 +228,12 @@ std::unordered_map* Actor::get_properties() } /** Retrieve the property value (or nullptr if not set) */ -const char* Actor::get_property(std::string key) +const char* Actor::get_property(const std::string& key) { return simgrid::simix::simcall([this, key] { return pimpl_->get_property(key); }); } -void Actor::set_property(std::string key, std::string value) +void Actor::set_property(const std::string& key, std::string value) { simgrid::simix::simcall([this, key, value] { pimpl_->set_property(key, std::move(value)); }); }