Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use specialized vector::swap.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 1 Mar 2019 11:49:41 +0000 (12:49 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 1 Mar 2019 22:56:51 +0000 (23:56 +0100)
src/simix/smx_global.cpp

index aade81d..6e72b43 100644 (file)
@@ -369,10 +369,9 @@ static bool SIMIX_execute_tasks()
   if (simix_global->tasks.empty())
     return false;
 
   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:
   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)
 
     // Execute all the queued tasks:
     for (auto& task : simix_global->tasksTemp)