From: Arnaud Giersch Date: Thu, 24 Jun 2021 08:03:30 +0000 (+0200) Subject: Declare method const. X-Git-Tag: v3.28~68 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/83209e5afa3082b8dbeb30e7864406c302cad78b Declare method const. --- diff --git a/src/surf/network_interface.cpp b/src/surf/network_interface.cpp index fc90ecb7f6..de4f57e20e 100644 --- a/src/surf/network_interface.cpp +++ b/src/surf/network_interface.cpp @@ -162,7 +162,7 @@ LinkImpl* LinkImpl::set_latency_profile(profile::Profile* profile) return this; } -void LinkImpl::set_concurrency_limit(int limit) +void LinkImpl::set_concurrency_limit(int limit) const { if (limit != -1) { get_constraint()->reset_concurrency_maximum(); diff --git a/src/surf/network_interface.hpp b/src/surf/network_interface.hpp index 6a88c88672..7905057a3e 100644 --- a/src/surf/network_interface.hpp +++ b/src/surf/network_interface.hpp @@ -149,7 +149,7 @@ public: * Profile must contain absolute values */ virtual LinkImpl* set_latency_profile(kernel::profile::Profile* profile); - void set_concurrency_limit(int limit); + void set_concurrency_limit(int limit) const; Metric latency_ = {0.0, 1, nullptr}; Metric bandwidth_ = {1.0, 1, nullptr};