Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
std::unordered_map are sufficient, no need for boost here
[simgrid.git] / src / surf / network_interface.cpp
index 00ea637..6a0a74a 100644 (file)
@@ -61,7 +61,7 @@ extern "C" {
 namespace simgrid {
   namespace surf {
 
-    boost::unordered_map<std::string,Link *> *Link::links = new boost::unordered_map<std::string,Link *>();
+    std::unordered_map<std::string,Link *> *Link::links = new std::unordered_map<std::string,Link *>();
     Link *Link::byName(const char* name) {
       if (links->find(name) == links->end())
         return nullptr;
@@ -131,18 +131,14 @@ namespace simgrid {
 
     double NetworkModel::next_occuring_event_full(double now)
     {
-      NetworkAction *action = nullptr;
       ActionList *runningActions = surf_network_model->getRunningActionSet();
-      double minRes;
-
-      minRes = shareResourcesMaxMin(runningActions, surf_network_model->maxminSystem_, surf_network_model->f_networkSolve);
+      double minRes = shareResourcesMaxMin(runningActions, surf_network_model->maxminSystem_, surf_network_model->f_networkSolve);
 
       for(ActionList::iterator it(runningActions->begin()), itend(runningActions->end())
           ; it != itend ; ++it) {
-        action = static_cast<NetworkAction*>(&*it);
-        if (action->latency_ > 0) {
+        NetworkAction *action = static_cast<NetworkAction*>(&*it);
+        if (action->latency_ > 0)
           minRes = (minRes < 0) ? action->latency_ : std::min(minRes, action->latency_);
-        }
       }
 
       XBT_DEBUG("Min of share resources %f", minRes);