Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simplify loops on sets
[simgrid.git] / src / surf / network_interface.cpp
index 0b5a2bb..fdb7f86 100644 (file)
@@ -63,7 +63,6 @@ namespace simgrid {
     NetworkModel::~NetworkModel()
     {
       lmm_system_free(maxminSystem_);
-      xbt_heap_free(actionHeap_);
       delete modifiedSet_;
     }
 
@@ -83,7 +82,7 @@ namespace simgrid {
     {
       double minRes = Model::nextOccuringEventFull(now);
 
-      for(auto it(getRunningActionSet()->begin()), itend(getRunningActionSet()->end()); it != itend ; it++) {
+      for (auto it(getRunningActionSet()->begin()); it != getRunningActionSet()->end(); it++) {
         NetworkAction *action = static_cast<NetworkAction*>(&*it);
         if (action->latency_ > 0)
           minRes = (minRes < 0) ? action->latency_ : std::min(minRes, action->latency_);
@@ -196,7 +195,7 @@ namespace simgrid {
     {
       std::list<LinkImpl*> retlist;
       lmm_system_t sys = getModel()->getMaxminSystem();
-      int llen         = lmm_get_number_of_cnst_from_var(sys, variable_);
+      int llen         = lmm_get_number_of_cnst_from_var(sys, getVariable());
 
       for (int i = 0; i < llen; i++) {
         /* Beware of composite actions: ptasks put links and cpus together */