Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] bunch of smells
[simgrid.git] / include / simgrid / s4u / Link.hpp
index 3c5a953..5939fe3 100644 (file)
@@ -165,7 +165,7 @@ public:
     on_communication_state_change.connect(cb);
   }
   /** @brief Add a callback fired when a Link is destroyed */
-  static void on_destruction_cb(std::function<void(Link const&)> cb) { on_destruction.connect(cb); }
+  static void on_destruction_cb(const std::function<void(Link const&)>& cb) { on_destruction.connect(cb); }
 };
 
 /**