Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove unused type definitions.
[simgrid.git] / src / s4u / s4u_Link.cpp
index b3470e5..99d994e 100644 (file)
@@ -26,12 +26,12 @@ simgrid::xbt::signal<void(kernel::resource::NetworkAction*, Host* src, Host* dst
 simgrid::xbt::signal<void(kernel::resource::NetworkAction*, kernel::resource::Action::State)>
     Link::on_communication_state_change;
 
-Link* Link::by_name(std::string name)
+Link* Link::by_name(const std::string& name)
 {
   return Engine::get_instance()->link_by_name(name);
 }
 
-Link* Link::by_name_or_null(std::string name)
+Link* Link::by_name_or_null(const std::string& name)
 {
   return Engine::get_instance()->link_by_name_or_null(name);
 }
@@ -82,10 +82,6 @@ bool Link::is_on() const
 {
   return this->pimpl_->is_on();
 }
-bool Link::is_off() const
-{
-  return this->pimpl_->is_off();
-}
 
 void* Link::get_data()
 {
@@ -109,13 +105,13 @@ void Link::set_latency_profile(kernel::profile::Profile* trace)
   simgrid::simix::simcall([this, trace]() { this->pimpl_->set_latency_profile(trace); });
 }
 
-const char* Link::get_property(std::string key)
+const char* Link::get_property(const std::string& key)
 {
   return this->pimpl_->get_property(key);
 }
-void Link::set_property(std::string key, std::string value)
+void Link::set_property(const std::string& key, const std::string& value)
 {
-  simgrid::simix::simcall([this, key, value] { this->pimpl_->set_property(key, value); });
+  simgrid::simix::simcall([this, &key, &value] { this->pimpl_->set_property(key, value); });
 }
 } // namespace s4u
 } // namespace simgrid