Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use (const) references with range-based for loops.
[simgrid.git] / src / kernel / routing / FloydZone.cpp
index 863c876..7c59972 100644 (file)
@@ -21,7 +21,7 @@ namespace simgrid {
 namespace kernel {
 namespace routing {
 
-FloydZone::FloydZone(NetZone* father, const char* name) : RoutedZone(father, name)
+FloydZone::FloydZone(NetZone* father, std::string name) : RoutedZone(father, name)
 {
   predecessorTable_ = nullptr;
   costTable_        = nullptr;
@@ -74,7 +74,7 @@ void FloydZone::getLocalRoute(NetPoint* src, NetPoint* dst, sg_platf_route_cbarg
       getGlobalRoute(prev_dst_gw, e_route->gw_src, route->link_list, lat);
     }
 
-    for (auto link : *e_route->link_list) {
+    for (auto const& link : *e_route->link_list) {
       route->link_list->push_back(link);
       if (lat)
         *lat += link->latency();