From 0d7a222297c1d39c43cdb2f09ea1d5ddd03c7aa0 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Tue, 22 Dec 2015 22:13:39 +0100 Subject: [PATCH] code simplification --- src/surf/callbacks.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/surf/callbacks.cpp b/src/surf/callbacks.cpp index 07b63df115..34774a077a 100644 --- 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) { - 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); }); } -- 2.20.1