X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4cedf6f3e1b53c5de2a19a293418a04c5d4d777f..f23b0fb864cb60978c1fcfd48d50f62dd054fe31:/src/s4u/s4u_Engine.cpp diff --git a/src/s4u/s4u_Engine.cpp b/src/s4u/s4u_Engine.cpp index 330b7ea38f..e4372120df 100644 --- a/src/s4u/s4u_Engine.cpp +++ b/src/s4u/s4u_Engine.cpp @@ -263,13 +263,13 @@ void Engine::run() /** @brief Retrieve the root netzone, containing all others */ s4u::NetZone* Engine::get_netzone_root() { - return pimpl->netzone_root_; + return pimpl->netzone_root_->get_iface(); } /** @brief Set the root netzone, containing all others. Once set, it cannot be changed. */ void Engine::set_netzone_root(s4u::NetZone* netzone) { xbt_assert(pimpl->netzone_root_ == nullptr, "The root NetZone cannot be changed once set"); - pimpl->netzone_root_ = static_cast(netzone); + pimpl->netzone_root_ = netzone->get_impl(); } static s4u::NetZone* netzone_by_name_recursive(s4u::NetZone* current, const char* name) @@ -277,7 +277,7 @@ static s4u::NetZone* netzone_by_name_recursive(s4u::NetZone* current, const char if (not strcmp(current->get_cname(), name)) return current; - for (auto const& elem : *(current->get_children())) { + for (auto const& elem : current->get_children()) { simgrid::s4u::NetZone* tmp = netzone_by_name_recursive(elem, name); if (tmp != nullptr) { return tmp;