Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use structured binding declarations (sonar, c++17).
[simgrid.git] / src / kernel / routing / StarZone.cpp
index ee9a808..2de8f5e 100644 (file)
@@ -170,10 +170,10 @@ void StarZone::do_seal()
 {
   /* add default empty links if nothing was configured by user */
   for (auto const& node : get_vertices()) {
-    auto route = routes_.try_emplace(node->id());
-    if (route.second) {
-      route.first->second.links_down_set = true;
-      route.first->second.links_up_set   = true;
+    auto [route, inserted] = routes_.try_emplace(node->id());
+    if (inserted) {
+      route->second.links_down_set = true;
+      route->second.links_up_set   = true;
     }
   }
 }