From: Frederic Suter Date: Fri, 27 Mar 2020 23:14:11 +0000 (+0100) Subject: no need to store a netpoint_ there X-Git-Tag: v3.26~690 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/9a35e3d4e5aed80e7b3fab624547ab045dc00f8a no need to store a netpoint_ there --- diff --git a/src/instr/instr_paje_containers.cpp b/src/instr/instr_paje_containers.cpp index c0ef9ad310..0680d8c9d3 100644 --- a/src/instr/instr_paje_containers.cpp +++ b/src/instr/instr_paje_containers.cpp @@ -30,8 +30,7 @@ Container* Container::get_root() NetZoneContainer::NetZoneContainer(const std::string& name, unsigned int level, NetZoneContainer* father) : Container::Container(name, "", father) { - netpoint_ = s4u::Engine::get_instance()->netpoint_by_name_or_null(get_name()); - xbt_assert(netpoint_, "Element '%s' not found", get_cname()); + xbt_assert(s4u::Engine::get_instance()->netpoint_by_name_or_null(get_name()), "Element '%s' not found", get_cname()); if (father_) { std::string type_name = std::string("L") + std::to_string(level); type_ = father_->type_->by_name_or_create(type_name); @@ -47,18 +46,14 @@ RouterContainer::RouterContainer(const std::string& name, Container* father) : Container::Container(name, "ROUTER", father) { xbt_assert(father, "Only the Root container has no father"); - - netpoint_ = s4u::Engine::get_instance()->netpoint_by_name_or_null(get_name()); - xbt_assert(netpoint_, "Element '%s' not found", get_cname()); + xbt_assert(s4u::Engine::get_instance()->netpoint_by_name_or_null(get_name()), "Element '%s' not found", get_cname()); } HostContainer::HostContainer(s4u::Host const& host, NetZoneContainer* father) : Container::Container(host.get_name(), "HOST", father) { xbt_assert(father, "Only the Root container has no father"); - - netpoint_ = host.get_netpoint(); - xbt_assert(netpoint_, "Element '%s' not found", host.get_cname()); + xbt_assert(host.get_netpoint(), "Element '%s' not found", host.get_cname()); } Container::Container(const std::string& name, const std::string& type_name, Container* father) diff --git a/src/instr/instr_paje_containers.hpp b/src/instr/instr_paje_containers.hpp index 584f0ee79f..71cfda3da3 100644 --- a/src/instr/instr_paje_containers.hpp +++ b/src/instr/instr_paje_containers.hpp @@ -32,7 +32,6 @@ public: Type* type_; /* Type of this container */ Container* father_; std::map children_; - kernel::routing::NetPoint* netpoint_ = nullptr; static Container* by_name_or_null(const std::string& name); static Container* by_name(const std::string& name);