A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use structured binding declarations (sonar, c++17).
[simgrid.git]
/
src
/
surf
/
sg_platf.cpp
diff --git
a/src/surf/sg_platf.cpp
b/src/surf/sg_platf.cpp
index
a149825
..
f885a28
100644
(file)
--- 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 */
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;
/* 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);
}
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()) {
{
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);
}
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
);
}
}