Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
More references for parameters of type std::function.
[simgrid.git] / src / smpi / plugins / load_balancer / load_balancer.hpp
index 97c1dc3..69b2dae 100644 (file)
@@ -45,7 +45,7 @@ public:
     return host_to_actors.count(host); // TODO This is linear in the size of the map. Maybe replace by constant lookup through another map?
   }
 
-  void for_each_actor(simgrid::s4u::Host* host, std::function<void(simgrid::s4u::ActorPtr)> callback)
+  void for_each_actor(simgrid::s4u::Host* host, const std::function<void(simgrid::s4u::ActorPtr)>& callback)
   {
     auto range = host_to_actors.equal_range(host);
     std::for_each(