X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c1b3e440de2150420b08c0bc55a125a0c9eb86bc..eadbe829389f23151f79257824f3164d7801bbc7:/src/kernel/routing/NetPoint.cpp?ds=sidebyside diff --git a/src/kernel/routing/NetPoint.cpp b/src/kernel/routing/NetPoint.cpp index 87409f62c7..434f94329c 100644 --- a/src/kernel/routing/NetPoint.cpp +++ b/src/kernel/routing/NetPoint.cpp @@ -13,17 +13,17 @@ namespace simgrid { namespace kernel { namespace routing { -simgrid::xbt::signal NetPoint::on_creation; +simgrid::xbt::signal NetPoint::on_creation; -NetPoint::NetPoint(std::string name, NetPoint::Type componentType, NetZoneImpl* netzone_p) - : name_(std::move(name)), component_type_(componentType), englobing_zone_(netzone_p) +NetPoint::NetPoint(const std::string& name, NetPoint::Type componentType, NetZoneImpl* netzone_p) + : name_(name), component_type_(componentType), englobing_zone_(netzone_p) { if (netzone_p != nullptr) id_ = netzone_p->add_component(this); else id_ = static_cast(-1); simgrid::s4u::Engine::get_instance()->netpoint_register(this); - simgrid::kernel::routing::NetPoint::on_creation(this); + simgrid::kernel::routing::NetPoint::on_creation(*this); } } }