Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'actor-yield' of github.com:Takishipp/simgrid into actor-yield
[simgrid.git] / examples / simdag / test / sd_test.cpp
index 3b3de64..affd7b6 100644 (file)
@@ -40,9 +40,9 @@ int main(int argc, char **argv)
   XBT_INFO("Route between %s and %s:", h1->getCname(), h2->getCname());
   std::vector<sg_link_t> route;
   double latency = 0;
-  h1->routeTo(h2, &route, &latency);
+  h1->routeTo(h2, route, &latency);
 
-  for (auto link : route)
+  for (auto const& link : route)
     XBT_INFO("   Link %s: latency = %f, bandwidth = %f", sg_link_name(link), sg_link_latency(link),
              sg_link_bandwidth(link));
 
@@ -128,7 +128,7 @@ int main(int argc, char **argv)
   SD_task_schedule(taskD, 2, host_list, computation_amount, communication_amount, -1);
 
   std::set<SD_task_t> *changed_tasks = simgrid::sd::simulate(-1.0);
-  for (auto task: *changed_tasks){
+  for (auto const& task : *changed_tasks) {
     XBT_INFO("Task '%s' start time: %f, finish time: %f", SD_task_get_name(task),
           SD_task_get_start_time(task), SD_task_get_finish_time(task));
   }