From ad53d6c521630da7ae64041e066e3815276195e9 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Tue, 5 Mar 2019 22:46:54 +0100 Subject: [PATCH] Use proper type instead of void*. --- src/include/xbt/parmap.hpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/include/xbt/parmap.hpp b/src/include/xbt/parmap.hpp index ceea1e062c..0a5f24bdb1 100644 --- a/src/include/xbt/parmap.hpp +++ b/src/include/xbt/parmap.hpp @@ -135,7 +135,7 @@ private: void worker_wait(unsigned) override; }; - static void* worker_main(void* arg); + static void worker_main(ThreadData* data); Synchro* new_synchro(e_xbt_parmap_mode_t mode); void work(); @@ -291,9 +291,8 @@ template typename Parmap::Synchro* Parmap::new_synchro(e_xbt_ } /** @brief Main function of a worker thread */ -template void* Parmap::worker_main(void* arg) +template void Parmap::worker_main(ThreadData* data) { - ThreadData* data = static_cast(arg); Parmap& parmap = data->parmap; unsigned round = 0; smx_context_t context = simix_global->context_factory->create_context(std::function(), nullptr); @@ -316,7 +315,6 @@ template void* Parmap::worker_main(void* arg) /* We are destroying the parmap */ delete context; delete data; - return nullptr; } template Parmap::PosixSynchro::PosixSynchro(Parmap& parmap) : Synchro(parmap) -- 2.20.1