X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b8be0a3a0322cb22b312549b0e8af9156b221abf..321102577020b194dfb7ba89e48687952816849e:/src/surf/xml/surfxml_parseplatf.cpp diff --git a/src/surf/xml/surfxml_parseplatf.cpp b/src/surf/xml/surfxml_parseplatf.cpp index a6ea4eb359..a46d4acd80 100644 --- a/src/surf/xml/surfxml_parseplatf.cpp +++ b/src/surf/xml/surfxml_parseplatf.cpp @@ -66,53 +66,53 @@ void parse_platform_file(const std::string& file) const auto engine = simgrid::s4u::Engine::get_instance(); /* connect all profiles relative to hosts */ - for (auto const& elm : trace_connect_list_host_avail) { - surf_parse_assert(traces_set_list.find(elm.first) != traces_set_list.end(), - std::string(": Trace ") + elm.first + " undefined."); - auto profile = traces_set_list.at(elm.first); + for (auto const& [trace, name] : trace_connect_list_host_avail) { + surf_parse_assert(traces_set_list.find(trace) != traces_set_list.end(), + std::string(": Trace ") + trace + " undefined."); + auto profile = traces_set_list.at(trace); - auto host = engine->host_by_name_or_null(elm.second); - surf_parse_assert(host, std::string(": Host ") + elm.second + " undefined."); + auto host = engine->host_by_name_or_null(name); + surf_parse_assert(host, std::string(": Host ") + name + " undefined."); host->set_state_profile(profile); } - for (auto const& elm : trace_connect_list_host_speed) { - surf_parse_assert(traces_set_list.find(elm.first) != traces_set_list.end(), - std::string(": Trace ") + elm.first + " undefined."); - auto profile = traces_set_list.at(elm.first); + for (auto const& [trace, name] : trace_connect_list_host_speed) { + surf_parse_assert(traces_set_list.find(trace) != traces_set_list.end(), + std::string(": Trace ") + trace + " undefined."); + auto profile = traces_set_list.at(trace); - auto host = engine->host_by_name_or_null(elm.second); - surf_parse_assert(host, std::string(": Host ") + elm.second + " undefined."); + auto host = engine->host_by_name_or_null(name); + surf_parse_assert(host, std::string(": Host ") + name + " undefined."); host->set_speed_profile(profile); } - for (auto const& elm : trace_connect_list_link_avail) { - surf_parse_assert(traces_set_list.find(elm.first) != traces_set_list.end(), - std::string(": Trace ") + elm.first + " undefined."); - auto profile = traces_set_list.at(elm.first); + for (auto const& [trace, name] : trace_connect_list_link_avail) { + surf_parse_assert(traces_set_list.find(trace) != traces_set_list.end(), + std::string(": Trace ") + trace + " undefined."); + auto profile = traces_set_list.at(trace); - auto link = engine->link_by_name_or_null(elm.second); - surf_parse_assert(link, std::string(": Link ") + elm.second + " undefined."); + auto link = engine->link_by_name_or_null(name); + surf_parse_assert(link, std::string(": Link ") + name + " undefined."); link->set_state_profile(profile); } - for (auto const& elm : trace_connect_list_link_bw) { - surf_parse_assert(traces_set_list.find(elm.first) != traces_set_list.end(), - std::string(": Trace ") + elm.first + " undefined."); - auto profile = traces_set_list.at(elm.first); + for (auto const& [trace, name] : trace_connect_list_link_bw) { + surf_parse_assert(traces_set_list.find(trace) != traces_set_list.end(), + std::string(": Trace ") + trace + " undefined."); + auto profile = traces_set_list.at(trace); - auto link = engine->link_by_name_or_null(elm.second); - surf_parse_assert(link, std::string(": Link ") + elm.second + " undefined."); + auto link = engine->link_by_name_or_null(name); + surf_parse_assert(link, std::string(": Link ") + name + " undefined."); link->set_bandwidth_profile(profile); } - for (auto const& elm : trace_connect_list_link_lat) { - surf_parse_assert(traces_set_list.find(elm.first) != traces_set_list.end(), - std::string(": Trace ") + elm.first + " undefined."); - auto profile = traces_set_list.at(elm.first); + for (auto const& [trace, name] : trace_connect_list_link_lat) { + surf_parse_assert(traces_set_list.find(trace) != traces_set_list.end(), + std::string(": Trace ") + trace + " undefined."); + auto profile = traces_set_list.at(trace); - auto link = engine->link_by_name_or_null(elm.second); - surf_parse_assert(link, std::string(": Link ") + elm.second + " undefined."); + auto link = engine->link_by_name_or_null(name); + surf_parse_assert(link, std::string(": Link ") + name + " undefined."); link->set_latency_profile(profile); }