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
re-move content into separate callback functions (and empty the destructor)
[simgrid.git]
/
src
/
surf
/
callbacks.cpp
diff --git
a/src/surf/callbacks.cpp
b/src/surf/callbacks.cpp
index
07b63df
..
34774a0
100644
(file)
--- a/
src/surf/callbacks.cpp
+++ b/
src/surf/callbacks.cpp
@@
-13,10
+13,7
@@
void surf_on_host_created(void (*callback)(sg_host_t))
{
simgrid::surf::Host::onCreation.connect([callback](simgrid::surf::Host* host) {
void surf_on_host_created(void (*callback)(sg_host_t))
{
simgrid::surf::Host::onCreation.connect([callback](simgrid::surf::Host* host) {
- const char* id = host->getName();
- sg_host_t h = sg_host_by_name(id);
- xbt_assert(h != NULL, "Host not found for name %s", id);
- callback(h);
+ callback(host->p_host);
});
}
});
}