X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c312320c2e43da49b536c51a9d19b6ad6d66e489..5dd78326c18ad61561204c0d11470890cd12d091:/src/kernel/xml/platf_sax_cb.cpp diff --git a/src/kernel/xml/platf_sax_cb.cpp b/src/kernel/xml/platf_sax_cb.cpp index 2a2abe87c9..d48b491ea2 100644 --- a/src/kernel/xml/platf_sax_cb.cpp +++ b/src/kernel/xml/platf_sax_cb.cpp @@ -269,7 +269,7 @@ static void add_remote_disks() continue; std::vector tokens; boost::split(tokens, remote_disk_str, boost::is_any_of(":")); - simgrid::s4u::Host* remote_host = simgrid::s4u::Host::by_name_or_null(tokens[2]); + const simgrid::s4u::Host* remote_host = simgrid::s4u::Host::by_name_or_null(tokens[2]); xbt_assert(remote_host, "You're trying to access a host that does not exist. Please check your platform file"); const simgrid::s4u::Disk* disk = nullptr; @@ -310,7 +310,6 @@ void ETag_simgrid_parse_platform() simgrid::s4u::Engine::on_simulation_end_cb(&remove_remote_disks); if (fire_on_platform_created_callback) simgrid::s4u::Engine::on_platform_created(); - } void STag_simgrid_parse_prop() @@ -1010,9 +1009,9 @@ void simgrid_parse(bool fire_on_platform_created_callback_param) for (auto const& [trace, name] : trace_connect_list_host_avail) { simgrid_parse_assert(traces_set_list.find(trace) != traces_set_list.end(), ": Trace " + trace + " undefined."); - auto profile = traces_set_list.at(trace); + auto* profile = traces_set_list.at(trace); - auto host = engine->host_by_name_or_null(name); + auto* host = engine->host_by_name_or_null(name); simgrid_parse_assert(host, ": Host " + name + " undefined."); host->set_state_profile(profile); } @@ -1021,9 +1020,9 @@ void simgrid_parse(bool fire_on_platform_created_callback_param) for (auto const& [trace, name] : trace_connect_list_host_speed) { simgrid_parse_assert(traces_set_list.find(trace) != traces_set_list.end(), ": Trace " + trace + " undefined."); - auto profile = traces_set_list.at(trace); + auto* profile = traces_set_list.at(trace); - auto host = engine->host_by_name_or_null(name); + auto* host = engine->host_by_name_or_null(name); simgrid_parse_assert(host, ": Host " + name + " undefined."); host->set_speed_profile(profile); } @@ -1032,9 +1031,9 @@ void simgrid_parse(bool fire_on_platform_created_callback_param) for (auto const& [trace, name] : trace_connect_list_link_avail) { simgrid_parse_assert(traces_set_list.find(trace) != traces_set_list.end(), ": Trace " + trace + " undefined."); - auto profile = traces_set_list.at(trace); + auto* profile = traces_set_list.at(trace); - auto link = engine->link_by_name_or_null(name); + auto* link = engine->link_by_name_or_null(name); simgrid_parse_assert(link, ": Link " + name + " undefined."); link->set_state_profile(profile); } @@ -1043,9 +1042,9 @@ void simgrid_parse(bool fire_on_platform_created_callback_param) for (auto const& [trace, name] : trace_connect_list_link_bw) { simgrid_parse_assert(traces_set_list.find(trace) != traces_set_list.end(), ": Trace " + trace + " undefined."); - auto profile = traces_set_list.at(trace); + auto* profile = traces_set_list.at(trace); - auto link = engine->link_by_name_or_null(name); + auto* link = engine->link_by_name_or_null(name); simgrid_parse_assert(link, ": Link " + name + " undefined."); link->set_bandwidth_profile(profile); } @@ -1054,9 +1053,9 @@ void simgrid_parse(bool fire_on_platform_created_callback_param) for (auto const& [trace, name] : trace_connect_list_link_lat) { simgrid_parse_assert(traces_set_list.find(trace) != traces_set_list.end(), ": Trace " + trace + " undefined."); - auto profile = traces_set_list.at(trace); + auto* profile = traces_set_list.at(trace); - auto link = engine->link_by_name_or_null(name); + auto* link = engine->link_by_name_or_null(name); simgrid_parse_assert(link, ": Link " + name + " undefined."); link->set_latency_profile(profile); }