Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename method, and make it return a boolean.
[simgrid.git] / include / simgrid / s4u / Link.hpp
index 5924c0f893772e1942a2a525186c4b47d056a083..5939fe35e9a428d1aff381d6cbf1cca961daa7ff 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2004-2022. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -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); }
 };
 
 /**