Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove unnecessary calls to c_str().
[simgrid.git] / src / kernel / routing / VivaldiZone.cpp
index 88c8d98..5eb0694 100644 (file)
@@ -59,8 +59,8 @@ static std::vector<double>* netpoint_get_coords(NetPoint* np)
   return &coords->coords;
 }
 
-VivaldiZone::VivaldiZone(NetZoneImpl* father, std::string name, resource::NetworkModel* netmodel)
-    : ClusterZone(father, std::move(name), netmodel)
+VivaldiZone::VivaldiZone(NetZoneImpl* father, const std::string& name, resource::NetworkModel* netmodel)
+    : ClusterZone(father, name, netmodel)
 {
 }
 
@@ -85,8 +85,8 @@ void VivaldiZone::get_local_route(NetPoint* src, NetPoint* dst, RouteCreationArg
   if (src->is_netzone()) {
     std::string srcName = "router_" + src->get_name();
     std::string dstName = "router_" + dst->get_name();
-    route->gw_src       = simgrid::s4u::Engine::get_instance()->netpoint_by_name_or_null(srcName.c_str());
-    route->gw_dst       = simgrid::s4u::Engine::get_instance()->netpoint_by_name_or_null(dstName.c_str());
+    route->gw_src       = simgrid::s4u::Engine::get_instance()->netpoint_by_name_or_null(srcName);
+    route->gw_dst       = simgrid::s4u::Engine::get_instance()->netpoint_by_name_or_null(dstName);
   }
 
   /* Retrieve the private links */