Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
small cleanups here and there
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 26 Mar 2016 10:59:14 +0000 (11:59 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 26 Mar 2016 10:59:14 +0000 (11:59 +0100)
src/surf/network_constant.cpp
src/surf/network_ns3.cpp
src/surf/network_ns3.hpp
src/surf/surf_interface.cpp
src/surf/surf_interface.hpp

index 8d88832..960e513 100644 (file)
@@ -99,7 +99,6 @@ namespace simgrid {
         stateSet_ = getModel()->getDoneActionSet();
         stateSet_->push_back(*this);
       }
-      variable_ = NULL;
     };
   }
 }
index 0375f64..efd328b 100644 (file)
@@ -299,7 +299,7 @@ void NetworkNS3Model::updateActionsState(double now, double delta)
 
       std::vector<Link*> *route = new std::vector<Link*>();
 
-      routing_platf->getRouteAndLatency (action->srcElm_, action->dstElm_, route, NULL);
+      routing_platf->getRouteAndLatency (action->src_, action->dst_, route, NULL);
       for (auto link : *route)
         TRACE_surf_link_set_utilization (link->getName(), action->getCategory(), (data_delta_sent)/delta, now-delta, delta);
       delete route;
@@ -364,8 +364,8 @@ NetworkNS3Action::NetworkNS3Action(Model *model, double size, NetCard *src, NetC
 {
   XBT_DEBUG("Communicate from %s to %s", src->name(), dst->name());
 
-  srcElm_ = src;
-  dstElm_ = dst;
+  src_ = src;
+  dst_ = dst;
   ns3_create_flow(src->name(), dst->name(), surf_get_clock(), size, this);
 
   Link::onCommunicate(this, src, dst);
index a8f1f19..a92c17d 100644 (file)
@@ -56,8 +56,8 @@ public:
 
 //private:
   double lastSent_ = 0;
-  NetCard *srcElm_;
-  NetCard *dstElm_;
+  NetCard *src_;
+  NetCard *dst_;
 };
 
 }
index 05b3c8b..a6a4825 100644 (file)
@@ -883,12 +883,8 @@ void Action::updateRemainingLazy(double now)
   }
   else
   {
-    xbt_assert(stateSet_ == getModel()->getRunningActionSet(),
-        "You're updating an action that is not running.");
-
-      /* bogus priority, skip it */
-    xbt_assert(priority_ > 0,
-        "You're updating an action that seems suspended.");
+    xbt_assert(stateSet_ == getModel()->getRunningActionSet(), "You're updating an action that is not running.");
+    xbt_assert(priority_ > 0, "You're updating an action that seems suspended.");
   }
 
   delta = now - lastUpdate_;
index 7b13c6c..b5ada0e 100644 (file)
@@ -255,7 +255,7 @@ public:
   void gapRemove();
 
 protected:
-  lmm_variable_t variable_;
+  lmm_variable_t variable_ = nullptr;
   double lastValue_ = 0;
   double lastUpdate_ = 0;
   int suspended_ = 0;