From: Arnaud Giersch Date: Fri, 1 Mar 2019 11:49:41 +0000 (+0100) Subject: Use specialized vector::swap. X-Git-Tag: v3_22~190 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/1c8ef4ffcd38b6a20e665aaf6f26ac06d97f9cc6 Use specialized vector::swap. --- diff --git a/src/simix/smx_global.cpp b/src/simix/smx_global.cpp index aade81de83..6e72b4393a 100644 --- a/src/simix/smx_global.cpp +++ b/src/simix/smx_global.cpp @@ -369,10 +369,9 @@ static bool SIMIX_execute_tasks() if (simix_global->tasks.empty()) return false; - using std::swap; do { // We don't want the callbacks to modify the vector we are iterating over: - swap(simix_global->tasks, simix_global->tasksTemp); + simix_global->tasks.swap(simix_global->tasksTemp); // Execute all the queued tasks: for (auto& task : simix_global->tasksTemp)