Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Factorize common code to cancel actions when a resource is turned off.
[simgrid.git] / src / kernel / resource / models / ptask_L07.cpp
index 769292c06925c788159fd0a8542a367bb79f73c5..d0344f972b486357702fd598ec0d05dbaecbbc25 100644 (file)
@@ -56,7 +56,7 @@ HostL07Model::HostL07Model(const std::string& name, lmm::System* sys) : HostMode
   set_maxmin_system(sys);
 
   auto net_model = std::make_shared<NetworkL07Model>("Network_Ptask", this, sys);
-  auto engine    = EngineImpl::get_instance();
+  auto* engine   = EngineImpl::get_instance();
   engine->add_model(net_model);
   engine->get_netzone_root()->set_network_model(net_model);
 
@@ -194,7 +194,7 @@ L07Action::L07Action(Model* model, const std::vector<s4u::Host*>& host_list, con
       host_list_[k / host_nb]->route_to(host_list_[k % host_nb], route, &lat);
       latency = std::max(latency, lat);
 
-      for (auto const& link : route)
+      for (auto const* link : route)
         affected_links.insert(link->get_cname());
     }
 
@@ -223,7 +223,7 @@ L07Action::L07Action(Model* model, const std::vector<s4u::Host*>& host_list, con
       std::vector<StandardLinkImpl*> route;
       host_list_[k / host_nb]->route_to(host_list_[k % host_nb], route, nullptr);
 
-      for (auto const& link : route)
+      for (auto const* link : route)
         model->get_maxmin_system()->expand(link->get_constraint(), this->get_variable(), bytes_amount[k]);
     }
   }
@@ -257,7 +257,7 @@ CpuImpl* CpuL07Model::create_cpu(s4u::Host* host, const std::vector<double>& spe
 StandardLinkImpl* NetworkL07Model::create_link(const std::string& name, const std::vector<double>& bandwidths)
 {
   xbt_assert(bandwidths.size() == 1, "Non WIFI link must have only 1 bandwidth.");
-  auto link = new LinkL07(name, bandwidths[0], get_maxmin_system());
+  auto* link = new LinkL07(name, bandwidths[0], get_maxmin_system());
   link->set_model(this);
   return link;
 }