Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
clang-format: ExecImpl.cpp and sd_task.cpp
[simgrid.git] / src / simdag / sd_global.cpp
index e8ba4ed..5a9e822 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2006-2021. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -51,8 +51,7 @@ std::set<SD_task_t>* simulate(double how_long){
         SD_task_set_state(task, SD_DONE);
 
         /* the state has changed. Add it only if it's the first change */
-        if (sd_global->return_set.find(task) == sd_global->return_set.end())
-          sd_global->return_set.insert(task);
+        sd_global->return_set.emplace(task);
 
         /* remove the dependencies after this task */
         for (auto const& succ : *task->successors) {