X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a46510650f4fe2e157740c0f1982da871ac9c3ce..e4034f71c5d46dc5fc692d8d5c67fb47094026f4:/src/surf/network_wifi.cpp diff --git a/src/surf/network_wifi.cpp b/src/surf/network_wifi.cpp index 48c23e638d..1eba216d39 100644 --- a/src/surf/network_wifi.cpp +++ b/src/surf/network_wifi.cpp @@ -37,10 +37,9 @@ void NetworkWifiLink::set_host_rate(const s4u::Host* host, int rate_level) refresh_decay_bandwidths(); } -double NetworkWifiLink::get_host_rate(const s4u::Host* host) +double NetworkWifiLink::get_host_rate(const s4u::Host* host) const { - std::map::iterator host_rates_it; - host_rates_it = host_rates_.find(host->get_name()); + auto host_rates_it = host_rates_.find(host->get_name()); if (host_rates_it == host_rates_.end()) return -1; @@ -62,7 +61,7 @@ s4u::Link::SharingPolicy NetworkWifiLink::get_sharing_policy() const return s4u::Link::SharingPolicy::WIFI; } -int NetworkWifiLink::get_host_count() +int NetworkWifiLink::get_host_count() const { return host_rates_.size(); }