X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1e2a4672dd102fb81d2c2ffe1a93c973758a96bd..321102577020b194dfb7ba89e48687952816849e:/src/surf/sg_platf.cpp diff --git a/src/surf/sg_platf.cpp b/src/surf/sg_platf.cpp index a1498256a6..f885a28e80 100644 --- a/src/surf/sg_platf.cpp +++ b/src/surf/sg_platf.cpp @@ -249,8 +249,8 @@ static void sg_platf_new_cluster_flat(simgrid::kernel::routing::ClusterCreationA zone->set_parent(parent); /* set properties */ - for (auto const& elm : cluster->properties) - zone->set_property(elm.first, elm.second); + for (auto const& [key, value] : cluster->properties) + zone->set_property(key, value); /* Make the backbone */ const simgrid::s4u::Link* backbone = nullptr; @@ -591,7 +591,7 @@ void sg_platf_new_hostlink(const simgrid::kernel::routing::HostLinkCreationArgs* zone_cluster.host_links.emplace_back(*hostlink); } -void sg_platf_new_trace(simgrid::kernel::routing::ProfileCreationArgs* args) +void sg_platf_new_trace(const simgrid::kernel::routing::ProfileCreationArgs* args) { simgrid::kernel::profile::Profile* profile; if (not args->file.empty()) { @@ -601,5 +601,5 @@ void sg_platf_new_trace(simgrid::kernel::routing::ProfileCreationArgs* args) args->id.c_str()); profile = simgrid::kernel::profile::ProfileBuilder::from_string(args->id, args->pc_data, args->periodicity); } - traces_set_list.insert({args->id, profile}); + traces_set_list.try_emplace(args->id, profile); }