From: SUTER Frederic Date: Tue, 6 Apr 2021 07:53:01 +0000 (+0200) Subject: Save one assert and do not use shring policy to determine if WifiLink X-Git-Tag: v3.28~455^2~148 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/02bc23ca619ccb2575f0fe04f873c9498a4026fe Save one assert and do not use shring policy to determine if WifiLink --- diff --git a/src/s4u/s4u_Link.cpp b/src/s4u/s4u_Link.cpp index 231b05d266..373708bc68 100644 --- a/src/s4u/s4u_Link.cpp +++ b/src/s4u/s4u_Link.cpp @@ -104,10 +104,8 @@ Link::SharingPolicy Link::get_sharing_policy() const void Link::set_host_wifi_rate(const s4u::Host* host, int level) const { - xbt_assert(pimpl_->get_sharing_policy() == Link::SharingPolicy::WIFI, "Link %s does not seem to be a wifi link.", - get_cname()); auto* wlink = dynamic_cast(pimpl_); - xbt_assert(wlink != nullptr, "Cannot convert link %s into a wifi link.", get_cname()); + xbt_assert(wlink != nullptr, "Link %s does not seem to be a wifi link.", get_cname()); wlink->set_host_rate(host, level); }