Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
rename surf::Link into surf::LinkImpl to make room for s4u
[simgrid.git] / src / surf / network_smpi.cpp
index dedd899..e79e6cc 100644 (file)
@@ -59,7 +59,7 @@ namespace simgrid {
       xbt_dict_free(&gap_lookup);
     }
 
-    void NetworkSmpiModel::gapAppend(double size, Link* link, NetworkAction *act)
+    void NetworkSmpiModel::gapAppend(double size, LinkImpl* link, NetworkAction* act)
     {
       const char *src = link->getName();
       xbt_fifo_t fifo;
@@ -124,13 +124,13 @@ namespace simgrid {
       if (smpi_bw_factor.empty())
         smpi_bw_factor = parse_factor(xbt_cfg_get_string("smpi/bw-factor"));
 
-      double current=1.0;
-      for (auto fact: smpi_bw_factor) {
+      double current = 1.0;
+      for (const auto& fact : smpi_bw_factor) {
         if (size <= fact.factor) {
           XBT_DEBUG("%f <= %zu return %f", size, fact.factor, current);
           return current;
-        }else
-          current=fact.values.front();
+        } else
+          current = fact.values.front();
       }
       XBT_DEBUG("%f > %zu return %f", size, smpi_bw_factor.back().factor, current);
 
@@ -143,7 +143,7 @@ namespace simgrid {
         smpi_lat_factor = parse_factor(xbt_cfg_get_string("smpi/lat-factor"));
 
       double current=1.0;
-      for (auto fact: smpi_lat_factor) {
+      for (const auto& fact : smpi_lat_factor) {
         if (size <= fact.factor) {
           XBT_DEBUG("%f <= %zu return %f", size, fact.factor, current);
           return current;