From 54fded314ada71fc0b12a5493025f9effe475215 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Wed, 16 Jan 2019 10:40:19 +0100 Subject: [PATCH] cosmetics --- src/include/xbt/parmap.hpp | 3 +-- src/kernel/context/Context.cpp | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/include/xbt/parmap.hpp b/src/include/xbt/parmap.hpp index b82c126914..a94e6894c6 100644 --- a/src/include/xbt/parmap.hpp +++ b/src/include/xbt/parmap.hpp @@ -163,7 +163,7 @@ template Parmap::Parmap(unsigned num_workers, e_xbt_parmap_mode_ /* Initialize the thread pool data structure */ this->status = PARMAP_WORK; this->work_round = 0; - this->workers.reserve(num_workers); + this->workers.resize(num_workers); this->num_workers = num_workers; this->synchro = new_synchro(mode); @@ -206,7 +206,6 @@ template Parmap::~Parmap() for (unsigned i = 1; i < num_workers; i++) workers[i]->join(); - workers.clear(); delete synchro; } diff --git a/src/kernel/context/Context.cpp b/src/kernel/context/Context.cpp index cdce4e0546..7e3ce08813 100644 --- a/src/kernel/context/Context.cpp +++ b/src/kernel/context/Context.cpp @@ -21,7 +21,6 @@ smx_context_t SIMIX_context_new( void_pfn_smxprocess_t cleanup_func, smx_actor_t simix_process) { - xbt_assert(simix_global, "simix is not initialized, please call MSG_init first"); return simix_global->context_factory->create_context( std::move(code), cleanup_func, simix_process); } -- 2.20.1