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_Host.cpp
diff --git
a/src/s4u/s4u_Host.cpp
b/src/s4u/s4u_Host.cpp
index
3b35113
..
5e6879c
100644
(file)
--- a/
src/s4u/s4u_Host.cpp
+++ b/
src/s4u/s4u_Host.cpp
@@
-65,11
+65,11
@@
void Host::destroy()
}
}
}
}
-Host* Host::by_name(
std::string
name)
+Host* Host::by_name(
const std::string&
name)
{
return Engine::get_instance()->host_by_name(name);
}
{
return Engine::get_instance()->host_by_name(name);
}
-Host* Host::by_name_or_null(
std::string
name)
+Host* Host::by_name_or_null(
const std::string&
name)
{
return Engine::get_instance()->host_by_name_or_null(name);
}
{
return Engine::get_instance()->host_by_name_or_null(name);
}
@@
-187,12
+187,12
@@
std::unordered_map<std::string, std::string>* Host::get_properties()
}
/** Retrieve the property value (or nullptr if not set) */
}
/** Retrieve the property value (or nullptr if not set) */
-const char* Host::get_property(
std::string
key) const
+const char* Host::get_property(
const std::string&
key) const
{
return this->pimpl_->get_property(key);
}
{
return this->pimpl_->get_property(key);
}
-void Host::set_property(
std::string
key, std::string value)
+void Host::set_property(
const std::string&
key, std::string value)
{
simgrid::simix::simcall([this, key, value] { this->pimpl_->set_property(key, std::move(value)); });
}
{
simgrid::simix::simcall([this, key, value] { this->pimpl_->set_property(key, std::move(value)); });
}