Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't build useless temporary object (sonar, c++17).
[simgrid.git] / src / kernel / resource / StandardLinkImpl.cpp
index 8e046826c0cc16be64ad3808defd0f63751a6a3a..92e4291cde63a62640f4d1065ccd041bb2c74d98 100644 (file)
@@ -24,10 +24,14 @@ StandardLinkImpl::StandardLinkImpl(const std::string& name) : LinkImpl(name), pi
   if (name != "__loopback__")
     xbt_assert(not s4u::Link::by_name_or_null(name), "Link '%s' declared several times in the platform.", name.c_str());
 
-  s4u::Engine::get_instance()->link_register(name, &piface_);
   XBT_DEBUG("Create link '%s'", name.c_str());
 }
 
+void StandardLinkImpl::Deleter::operator()(resource::StandardLinkImpl* link) const
+{
+  link->destroy();
+}
+
 /** @brief Fire the required callbacks and destroy the object
  *
  * Don't delete directly a Link, call l->destroy() instead.