From bb682d71205b17c0c0d45d19891681ec526d4ff5 Mon Sep 17 00:00:00 2001 From: SUTER Frederic Date: Fri, 23 Jul 2021 14:56:38 +0200 Subject: [PATCH] simplify --- src/s4u/s4u_Comm.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/s4u/s4u_Comm.cpp b/src/s4u/s4u_Comm.cpp index 36b5702cbf..bcf557de35 100644 --- a/src/s4u/s4u_Comm.cpp +++ b/src/s4u/s4u_Comm.cpp @@ -299,11 +299,7 @@ Actor* Comm::get_sender() const CommPtr Comm::set_copy_data_callback(void (*callback)(kernel::activity::CommImpl*, void*, size_t)) { - static void (*saved_callback)(kernel::activity::CommImpl*, void*, size_t); - saved_callback = callback; - copy_data_function_ = [](simgrid::kernel::activity::CommImpl* comm, void* buff, size_t size) { - saved_callback(comm, buff, size); - }; + copy_data_function_ = callback; return this; } -- 2.20.1