Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Prefer using "try_emplace" (sonar, c++17).
[simgrid.git] / src / kernel / routing / StarZone.cpp
index 489ecd9..6d4b0f7 100644 (file)
@@ -170,7 +170,7 @@ void StarZone::do_seal()
 {
   /* add default empty links if nothing was configured by user */
   for (auto const& node : get_vertices()) {
-    auto route = routes_.emplace(node->id(), StarRoute());
+    auto route = routes_.try_emplace(node->id(), StarRoute());
     if (route.second) {
       route.first->second.links_down_set = true;
       route.first->second.links_up_set   = true;