X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/12ef73b3c1b6ef7bb9f2cf8031edf5e99e6c27a1..f6f99dcf9389833131b373cad4646479c4de8751:/examples/cpp/task-switch-host/s4u-task-switch-host.cpp diff --git a/examples/cpp/task-switch-host/s4u-task-switch-host.cpp b/examples/cpp/task-switch-host/s4u-task-switch-host.cpp index 7023f68b48..4a93265d30 100644 --- a/examples/cpp/task-switch-host/s4u-task-switch-host.cpp +++ b/examples/cpp/task-switch-host/s4u-task-switch-host.cpp @@ -53,7 +53,7 @@ int main(int argc, char* argv[]) // Add a function to be called before each firing of comm0 // This function modifies the graph of tasks by adding or removing // successors to comm0 - comm0->on_this_start_cb([comm0, exec1, exec2, jupiter, fafard](sg4::Task*) { + comm0->on_this_start_cb([&comm0, exec1, exec2, jupiter, fafard](const sg4::Task*) { static int count = 0; if (count % 2 == 0) { comm0->set_destination(jupiter);