Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
more sonar fix
authorAdrien Gougeon <adrien.gougeon@ens-rennes.fr>
Mon, 5 Jun 2023 13:14:09 +0000 (15:14 +0200)
committerAdrien Gougeon <adrien.gougeon@ens-rennes.fr>
Mon, 5 Jun 2023 13:14:09 +0000 (15:14 +0200)
src/plugins/task.cpp

index f3f1ded..c464f04 100644 (file)
@@ -241,7 +241,7 @@ ExecTaskPtr ExecTask::init(const std::string& name, double flops, s4u::Host* hos
  */
 void ExecTask::fire()
 {
-  for (auto start_func : start_func_handlers_)
+  for (auto const& start_func : start_func_handlers_)
     start_func(this);
   Task::on_start(this);
   kernel::actor::simcall_answered([this] {
@@ -305,7 +305,7 @@ CommTaskPtr CommTask::init(const std::string& name, double bytes, s4u::Host* sou
  */
 void CommTask::fire()
 {
-  for (auto start_func : start_func_handlers_)
+  for (auto const& start_func : start_func_handlers_)
     start_func(this);
   Task::on_start(this);
   kernel::actor::simcall_answered([this] {
@@ -399,7 +399,7 @@ IoTaskPtr IoTask::set_op_type(s4u::Io::OpType type)
 
 void IoTask::fire()
 {
-  for (auto start_func : start_func_handlers_)
+  for (auto const& start_func : start_func_handlers_)
     start_func(this);
   Task::on_start(this);
   kernel::actor::simcall_answered([this] {