Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
explicitly capture the variables to please sonar
[simgrid.git] / src / s4u / s4u_engine.cpp
index 967f077..a39f436 100644 (file)
@@ -23,8 +23,8 @@ XBT_LOG_NEW_CATEGORY(s4u,"Log channels of the S4U (Simgrid for you) interface");
 
 namespace simgrid {
 namespace s4u {
-xbt::signal<void(void)> onPlatformCreated;
-xbt::signal<void(void)> onSimulationEnd;
+xbt::signal<void()> onPlatformCreated;
+xbt::signal<void()> onSimulationEnd;
 
 Engine *Engine::instance_ = nullptr; /* That singleton is awful, but I don't see no other solution right now. */
 
@@ -136,7 +136,7 @@ void Engine::netpointRegister(simgrid::kernel::routing::NetPoint* point)
 /** @brief Unregister a given netpoint */
 void Engine::netpointUnregister(simgrid::kernel::routing::NetPoint* point)
 {
-  simgrid::simix::kernelImmediate([&] {
+  simgrid::simix::kernelImmediate([this, point] {
     pimpl->netpoints_.erase(point->name());
     delete point;
   });