Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use simgrid::xbt::intrusive_erase().
[simgrid.git] / src / kernel / lmm / fair_bottleneck.cpp
index 5ff0ef2..71de3e7 100644 (file)
@@ -11,6 +11,7 @@
 #include <cfloat>
 #include <cmath>
 #include <cstdlib>
+#include <xbt/utility.hpp>
 
 XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_maxmin);
 #define SHOW_EXPR_G(expr) XBT_DEBUG(#expr " = %g", expr);
@@ -132,7 +133,7 @@ void simgrid::kernel::lmm::bottleneck_solve(lmm_system_t sys)
             break;
           if (elem.consumption_weight > 0 && elem.variable->saturated_variable_set_hook.is_linked()) {
             XBT_DEBUG("\t\tGet rid of variable %p", elem.variable);
-            var_list.erase(var_list.iterator_to(*elem.variable));
+            simgrid::xbt::intrusive_erase(var_list, *elem.variable);
           }
         }
       } else {