Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Prefer std algorithms.
[simgrid.git] / src / kernel / lmm / fair_bottleneck.cpp
index 17647ff..ffc1c05 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2022. 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. */
@@ -36,9 +36,8 @@ void simgrid::kernel::lmm::FairBottleneck::bottleneck_solve()
   }
 
   XBT_DEBUG("Active constraints : %zu", active_constraint_set.size());
-  for (Constraint& cnst : active_constraint_set) {
-    saturated_constraint_set.push_back(cnst);
-  }
+  saturated_constraint_set.insert(saturated_constraint_set.end(), active_constraint_set.begin(),
+                                  active_constraint_set.end());
   for (Constraint& cnst : saturated_constraint_set) {
     cnst.remaining_ = cnst.bound_;
     cnst.usage_     = 0.0;