/** @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<kernel::routing::NetZoneImpl*>(netzone);
+ pimpl->netzone_root_ = netzone->get_impl();
}
static s4u::NetZone* netzone_by_name_recursive(s4u::NetZone* current, const char* name)
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;