xbt_assert(nullptr == s4u::Engine::get_instance()->netpoint_by_name_or_null(get_name()),
"Refusing to create a second NetZone called '%s'.", get_cname());
- netpoint_ = new NetPoint(name_, NetPoint::Type::NetZone, father);
+ netpoint_ = new NetPoint(name_, NetPoint::Type::NetZone, father_);
XBT_DEBUG("NetZone '%s' created with the id '%u'", get_cname(), netpoint_->id());
}
s4u::Host* NetZoneImpl::create_host(const std::string& name, const std::vector<double>& speed_per_pstate,
int coreAmount, const std::map<std::string, std::string>* props)
{
- s4u::Host* res = new s4u::Host(name);
+ auto* res = new s4u::Host(name);
if (hierarchy_ == RoutingMode::unset)
hierarchy_ = RoutingMode::base;
}
/* Build a copy that will be stored in the dict */
- BypassRoute* newRoute = new BypassRoute(gw_src, gw_dst);
+ auto* newRoute = new BypassRoute(gw_src, gw_dst);
for (auto const& link : link_list)
newRoute->links.push_back(link);
NetZoneImpl* current = src->get_englobing_zone();
while (current != nullptr) {
path_src.push_back(current);
- current = static_cast<NetZoneImpl*>(current->get_father());
+ current = current->get_father();
}
std::vector<NetZoneImpl*> path_dst;
current = dst->get_englobing_zone();
while (current != nullptr) {
path_dst.push_back(current);
- current = static_cast<NetZoneImpl*>(current->get_father());
+ current = current->get_father();
}
/* (3) find the common father.
std::vector<NetZoneImpl*> path_src;
NetZoneImpl* current = src->get_englobing_zone();
while (current != nullptr) {
- path_src.push_back(static_cast<NetZoneImpl*>(current));
+ path_src.push_back(current);
current = current->father_;
}
std::vector<NetZoneImpl*> path_dst;
current = dst->get_englobing_zone();
while (current != nullptr) {
- path_dst.push_back(static_cast<NetZoneImpl*>(current));
+ path_dst.push_back(current);
current = current->father_;
}