From e7def5a590eef8c9e9bc434260954c81c7661be0 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 3 May 2018 15:35:33 +0200 Subject: [PATCH] Explicitly capture the required variables (sonar). --- src/s4u/s4u_Actor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s4u/s4u_Actor.cpp b/src/s4u/s4u_Actor.cpp index d5e30664ee..45239547be 100644 --- a/src/s4u/s4u_Actor.cpp +++ b/src/s4u/s4u_Actor.cpp @@ -69,7 +69,7 @@ void Actor::set_auto_restart(bool autorestart) void Actor::on_exit(int_f_pvoid_pvoid_t fun, void* data) { - simgrid::simix::kernelImmediate([&] { SIMIX_process_on_exit(pimpl_, fun, data); }); + simgrid::simix::kernelImmediate([this, fun, data] { SIMIX_process_on_exit(pimpl_, fun, data); }); } /** @brief Moves the actor to another host -- 2.20.1