X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/53124b16b318ae4f735ae32a82418c5157825757..e26a153e0ece22e44a1e05fca169114d935960df:/src/kernel/routing/DijkstraZone.cpp diff --git a/src/kernel/routing/DijkstraZone.cpp b/src/kernel/routing/DijkstraZone.cpp index 54396c5492..a63574b958 100644 --- a/src/kernel/routing/DijkstraZone.cpp +++ b/src/kernel/routing/DijkstraZone.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2009-2018. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2009-2019. 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. */ @@ -21,13 +21,13 @@ namespace routing { class GraphNodeData { public: - GraphNodeData(int id) : id_(id) {} + explicit GraphNodeData(int id) : id_(id) {} int id_; int graph_id_ = -1; /* used for caching internal graph id's */ }; -DijkstraZone::DijkstraZone(NetZoneImpl* father, std::string name, bool cached) - : RoutedZone(father, name), cached_(cached) +DijkstraZone::DijkstraZone(NetZoneImpl* father, std::string name, resource::NetworkModel* netmodel, bool cached) + : RoutedZone(father, std::move(name), netmodel), cached_(cached) { } @@ -55,7 +55,7 @@ void DijkstraZone::seal() route_graph_ = xbt_graph_new_graph(1, nullptr); /* Add the loopback if needed */ - if (surf_network_model->loopback_ && hierarchy_ == RoutingMode::base) { + if (network_model_->loopback_ && hierarchy_ == RoutingMode::base) { xbt_dynar_foreach (xbt_graph_get_nodes(route_graph_), cursor, node) { bool found = false; @@ -69,9 +69,9 @@ void DijkstraZone::seal() } if (not found) { - RouteCreationArgs* e_route = new simgrid::kernel::routing::RouteCreationArgs(); - e_route->link_list.push_back(surf_network_model->loopback_); - xbt_graph_new_edge(route_graph_, node, node, e_route); + RouteCreationArgs* route = new simgrid::kernel::routing::RouteCreationArgs(); + route->link_list.push_back(network_model_->loopback_); + xbt_graph_new_edge(route_graph_, node, node, route); } } }