Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use specialized vector::swap.
[simgrid.git] / 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;
 
-  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)