X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c66bb944af7d961fa6908a18a9d5ea949d2d390a..8c1b7322eacea06eba42b49420ddf9224030b60a:/src/surf/network_interface.cpp diff --git a/src/surf/network_interface.cpp b/src/surf/network_interface.cpp index e5e7b923b7..949e071e98 100644 --- a/src/surf/network_interface.cpp +++ b/src/surf/network_interface.cpp @@ -59,7 +59,7 @@ double NetworkModel::next_occurring_event_full(double now) double minRes = Model::next_occurring_event_full(now); for (Action const& action : *get_started_action_set()) { - const NetworkAction& net_action = static_cast(action); + const auto& net_action = static_cast(action); if (net_action.latency_ > 0) minRes = (minRes < 0) ? net_action.latency_ : std::min(minRes, net_action.latency_); } @@ -104,7 +104,7 @@ void LinkImpl::destroy() } } -bool LinkImpl::is_used() +bool LinkImpl::is_used() const { return get_model()->get_maxmin_system()->constraint_used(get_constraint()); } @@ -119,7 +119,7 @@ double LinkImpl::get_bandwidth() return bandwidth_.peak * bandwidth_.scale; } -s4u::Link::SharingPolicy LinkImpl::get_sharing_policy() +s4u::Link::SharingPolicy LinkImpl::get_sharing_policy() const { return get_constraint()->get_sharing_policy(); } @@ -151,7 +151,7 @@ void LinkImpl::turn_off() } } -void LinkImpl::on_bandwidth_change() +void LinkImpl::on_bandwidth_change() const { s4u::Link::on_bandwidth_change(this->piface_); } @@ -190,7 +190,7 @@ std::list NetworkAction::get_links() const /* Beware of composite actions: ptasks put links and cpus together */ // extra pb: we cannot dynamic_cast from void*... Resource* resource = get_variable()->get_constraint(i)->get_id(); - LinkImpl* link = dynamic_cast(resource); + auto* link = dynamic_cast(resource); if (link != nullptr) retlist.push_back(link); }