A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[sonar] Declare functions "const" in src/smpi/.
[simgrid.git]
/
src
/
smpi
/
plugins
/
load_balancer
/
load_balancer.hpp
diff --git
a/src/smpi/plugins/load_balancer/load_balancer.hpp
b/src/smpi/plugins/load_balancer/load_balancer.hpp
index
4264966
..
50e03b4
100644
(file)
--- a/
src/smpi/plugins/load_balancer/load_balancer.hpp
+++ b/
src/smpi/plugins/load_balancer/load_balancer.hpp
@@
-36,9
+36,9
@@
public:
host_to_actors.insert({host, actor});
}
host_to_actors.insert({host, actor});
}
- s4u::Host* get_host(s4u::ActorPtr actor)
{ return actor_to_host[actor]
; }
+ s4u::Host* get_host(s4u::ActorPtr actor)
const { return actor_to_host.at(actor)
; }
- unsigned int count_actors(s4u::Host* host)
+ unsigned int count_actors(s4u::Host* host)
const
{
return host_to_actors.count(host); // TODO This is linear in the size of the map. Maybe replace by constant lookup through another map?
}
{
return host_to_actors.count(host); // TODO This is linear in the size of the map. Maybe replace by constant lookup through another map?
}