X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/230573edfbee19213bd2a83d178ffb69283f4e07..74c1bf2b26c5a3aa0d8c29674dc12993e7c0de15:/src/msg/msg_environment.cpp diff --git a/src/msg/msg_environment.cpp b/src/msg/msg_environment.cpp index 1114b49594..83990658c2 100644 --- a/src/msg/msg_environment.cpp +++ b/src/msg/msg_environment.cpp @@ -53,7 +53,7 @@ msg_netzone_t MSG_zone_get_by_name(const char* name) void MSG_zone_get_sons(msg_netzone_t netzone, xbt_dict_t whereto) { - for (auto elem : *netzone->getChildren()) { + for (auto const& elem : *netzone->getChildren()) { xbt_dict_set(whereto, elem->getCname(), static_cast(elem), nullptr); } } @@ -73,7 +73,7 @@ void MSG_zone_get_hosts(msg_netzone_t netzone, xbt_dynar_t whereto) /* converts vector to dynar */ std::vector hosts; netzone->getHosts(&hosts); - for (auto host : hosts) + for (auto const& host : hosts) xbt_dynar_push(whereto, &host); }