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
Use const& for the parameters of type std::string not affected by previous commit.
[simgrid.git]
/
src
/
s4u
/
s4u_Actor.cpp
diff --git
a/src/s4u/s4u_Actor.cpp
b/src/s4u/s4u_Actor.cpp
index
725cd5f
..
1b92776
100644
(file)
--- 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<void()>
return actor->iface();
}
return actor->iface();
}
-ActorPtr Actor::create(std::string name, s4u::Host* host,
std::string
function, std::vector<std::string> args)
+ActorPtr Actor::create(std::string name, s4u::Host* host,
const std::string&
function, std::vector<std::string> args)
{
simgrid::simix::ActorCodeFactory& factory = SIMIX_get_actor_code_factory(function);
return create(std::move(name), host, factory(std::move(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<std::string, std::string>* Actor::get_properties()
}
/** Retrieve the property value (or nullptr if not set) */
}
/** 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); });
}
{
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)); });
}
{
simgrid::simix::simcall([this, key, value] { pimpl_->set_property(key, std::move(value)); });
}