Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Concatenate nested namespaces (sonar).
[simgrid.git] / src / surf / network_ib.cpp
index 693a90f..0592a7d 100644 (file)
@@ -45,9 +45,7 @@ void surf_network_model_init_IB()
   simgrid::config::set_default<double>("network/weight-S", 8775);
 }
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 void NetworkIBModel::IB_create_host_callback(s4u::Host const& host)
 {
@@ -183,9 +181,9 @@ void NetworkIBModel::update_IB_factors(NetworkAction* action, IBNode* from, IBNo
       to->active_comms_down_[from] -= 1;
 
     to->nb_active_comms_down_--;
-    auto it = std::find_if(begin(from->active_comms_up_), end(from->active_comms_up_),
-                           [action](const ActiveComm* comm) { return comm->action == action; });
-    if (it != std::end(from->active_comms_up_)) {
+    if (auto it = std::find_if(begin(from->active_comms_up_), end(from->active_comms_up_),
+                               [action](const ActiveComm* comm) { return comm->action == action; });
+        it != std::end(from->active_comms_up_)) {
       delete *it;
       from->active_comms_up_.erase(it);
     }
@@ -205,6 +203,4 @@ void NetworkIBModel::update_IB_factors(NetworkAction* action, IBNode* from, IBNo
   update_IB_factors_rec(from, updated);
   XBT_DEBUG("IB - Finished updating %d", from->id_);
 }
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource