X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4bc1b8a46fad46958e475b5bd38c402cc3b8bcfb..84402e8e2ee2a2d0bef25fdceb0a263ed8b471f6:/src/kernel/routing/FullZone.cpp diff --git a/src/kernel/routing/FullZone.cpp b/src/kernel/routing/FullZone.cpp index 77904a4a2b..79485471ac 100644 --- a/src/kernel/routing/FullZone.cpp +++ b/src/kernel/routing/FullZone.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2009-2018. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2009-2020. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -16,7 +16,8 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_full, surf, "Routing part of surf"); namespace simgrid { namespace kernel { namespace routing { -FullZone::FullZone(NetZone* father, std::string name) : RoutedZone(father, name) +FullZone::FullZone(NetZoneImpl* father, const std::string& name, resource::NetworkModel* netmodel) + : RoutedZone(father, name, netmodel) { } @@ -29,13 +30,13 @@ void FullZone::seal() routing_table_ = new RouteCreationArgs*[table_size * table_size](); /* Add the loopback if needed */ - if (surf_network_model->loopback_ && hierarchy_ == RoutingMode::base) { + if (network_model_->loopback_ && hierarchy_ == RoutingMode::base) { for (unsigned int i = 0; i < table_size; i++) { - RouteCreationArgs* e_route = TO_ROUTE_FULL(i, i); - if (not e_route) { - e_route = new RouteCreationArgs(); - e_route->link_list.push_back(surf_network_model->loopback_); - TO_ROUTE_FULL(i, i) = e_route; + RouteCreationArgs* route = TO_ROUTE_FULL(i, i); + if (not route) { + route = new RouteCreationArgs(); + route->link_list.push_back(network_model_->loopback_); + TO_ROUTE_FULL(i, i) = route; } } } @@ -58,7 +59,7 @@ void FullZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArgs* XBT_DEBUG("full getLocalRoute from %s[%u] to %s[%u]", src->get_cname(), src->id(), dst->get_cname(), dst->id()); unsigned int table_size = get_table_size(); - RouteCreationArgs* e_route = TO_ROUTE_FULL(src->id(), dst->id()); + const RouteCreationArgs* e_route = TO_ROUTE_FULL(src->id(), dst->id()); if (e_route != nullptr) { res->gw_src = e_route->gw_src;