X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1b89437671ba572a199dd4ff5766ba82720cdf03..a2d16cd78c8d1a779948aa69d6e396028c788a5e:/src/kernel/context/ContextSwapped.cpp diff --git a/src/kernel/context/ContextSwapped.cpp b/src/kernel/context/ContextSwapped.cpp index a0d7a4cd98..bbebfa6c31 100644 --- a/src/kernel/context/ContextSwapped.cpp +++ b/src/kernel/context/ContextSwapped.cpp @@ -12,6 +12,8 @@ #include "src/kernel/context/ContextSwapped.hpp" +#include + #ifdef _WIN32 #include #include @@ -212,8 +214,8 @@ void SwappedContextFactory::run_all() if (SIMIX_context_is_parallel()) { // We lazily create the parmap so that all options are actually processed when doing so. if (parmap_ == nullptr) - parmap_.reset( - new simgrid::xbt::Parmap(SIMIX_context_get_nthreads(), SIMIX_context_get_parallel_mode())); + parmap_ = std::make_unique>(SIMIX_context_get_nthreads(), + SIMIX_context_get_parallel_mode()); // Usually, Parmap::apply() executes the provided function on all elements of the array. // Here, the executed function does not return the control to the parmap before all the array is processed: