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
Use typed Mailbox::get<>() instead of using static_cast everywhere.
[simgrid.git]
/
teshsuite
/
s4u
/
pid
/
pid.cpp
diff --git
a/teshsuite/s4u/pid/pid.cpp
b/teshsuite/s4u/pid/pid.cpp
index
f8e2571
..
d9e79d8
100644
(file)
--- a/
teshsuite/s4u/pid/pid.cpp
+++ b/
teshsuite/s4u/pid/pid.cpp
@@
-25,7
+25,7
@@
static void killall()
{
simgrid::s4u::Mailbox* mailbox = simgrid::s4u::Mailbox::by_name("mailbox");
for (int i = 0; i < 3; i++) {
- const auto* pid =
static_cast<aid_t*>(mailbox->get()
);
+ const auto* pid =
mailbox->get<aid_t>(
);
XBT_INFO("Killing process \"%ld\".", *pid);
simgrid::s4u::Actor::by_pid(*pid)->kill();
}