]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/routing/NetZoneImpl.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
a few process to actor changes
[simgrid.git] / src / kernel / routing / NetZoneImpl.cpp
index babab5a07bdce6551d3981aade51cfebae63aaca..1fa94750af3558e1c5fcf4e9b84a83b5f532089e 100644 (file)
@@ -92,7 +92,7 @@ int NetZoneImpl::get_host_count()
   return count;
 }
 
-simgrid::s4u::Host* NetZoneImpl::create_host(const char* name, const std::vector<double>& speed_per_pstate,
+simgrid::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)
 {
   simgrid::s4u::Host* res = new simgrid::s4u::Host(name);
@@ -100,13 +100,12 @@ simgrid::s4u::Host* NetZoneImpl::create_host(const char* name, const std::vector
   if (hierarchy_ == RoutingMode::unset)
     hierarchy_ = RoutingMode::base;
 
-  res->pimpl_netpoint = new NetPoint(name, NetPoint::Type::Host, this);
+  res->set_netpoint(new NetPoint(name, NetPoint::Type::Host, this));
 
   surf_cpu_model_pm->create_cpu(res, speed_per_pstate, coreAmount);
 
   if (props != nullptr)
-    for (auto const& kv : *props)
-      res->set_property(kv.first, kv.second);
+    res->set_properties(*props);
 
   simgrid::s4u::Host::on_creation(*res); // notify the signal