Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
mv NetworkAction::rate_ to Action::user_bound_
[simgrid.git] / src / surf / network_ib.cpp
index ce8a68c..9653b66 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2014-2021. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -12,7 +12,7 @@
 #include <boost/algorithm/string/classification.hpp>
 #include <boost/algorithm/string/split.hpp>
 
-XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_network);
+XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(res_network);
 
 static void IB_create_host_callback(simgrid::s4u::Host const& host)
 {
@@ -186,9 +186,8 @@ void NetworkIBModel::updateIBfactors(NetworkAction* action, IBNode* from, IBNode
       to->ActiveCommsDown[from] -= 1;
 
     to->nbActiveCommsDown--;
-    std::vector<ActiveComm*>::iterator it =
-        std::find_if(begin(from->ActiveCommsUp), end(from->ActiveCommsUp),
-                     [action](const ActiveComm* comm) { return comm->action == action; });
+    auto it = std::find_if(begin(from->ActiveCommsUp), end(from->ActiveCommsUp),
+                           [action](const ActiveComm* comm) { return comm->action == action; });
     if (it != std::end(from->ActiveCommsUp)) {
       delete *it;
       from->ActiveCommsUp.erase(it);