Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Declare functions "const" (Sonar).
[simgrid.git] / src / s4u / s4u_Netzone.cpp
index f1ebe44..388cdd4 100644 (file)
@@ -116,14 +116,14 @@ NetZone* NetZone::seal()
 void NetZone::set_latency_factor_cb(
     std::function<double(double size, const s4u::Host* src, const s4u::Host* dst,
                          const std::vector<s4u::Link*>& /*links*/,
-                         const std::unordered_set<s4u::NetZone*>& /*netzones*/)> const& cb)
+                         const std::unordered_set<s4u::NetZone*>& /*netzones*/)> const& cb) const
 {
   kernel::actor::simcall_answered([this, &cb]() { pimpl_->get_network_model()->set_lat_factor_cb(cb); });
 }
 void NetZone::set_bandwidth_factor_cb(
     std::function<double(double size, const s4u::Host* src, const s4u::Host* dst,
                          const std::vector<s4u::Link*>& /*links*/,
-                         const std::unordered_set<s4u::NetZone*>& /*netzones*/)> const& cb)
+                         const std::unordered_set<s4u::NetZone*>& /*netzones*/)> const& cb) const
 {
   kernel::actor::simcall_answered([this, &cb]() { pimpl_->get_network_model()->set_bw_factor_cb(cb); });
 }