Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics: use the implemented features
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 15 Dec 2015 21:31:07 +0000 (22:31 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 15 Dec 2015 21:31:07 +0000 (22:31 +0100)
src/surf/surf_c_bindings.cpp

index 9ee5be1..fb4004a 100644 (file)
@@ -396,8 +396,7 @@ void surf_vm_destroy(sg_host_t resource){
   sg_host_surfcpu_destroy(resource);
   sg_host_edge_destroy(resource,1);
   // TODO, use backlink from simgrid::surf::Host to simgrid::Host
-  simgrid::Host* host = (simgrid::Host*) xbt_dict_get_or_null(host_list, name);
-  host->set_facet(SURF_HOST_LEVEL, nullptr);
+  simgrid::Host::by_name_or_null(name)->set_facet(SURF_HOST_LEVEL, nullptr);
 
   /* TODO: comment out when VM storage is implemented. */
   // host->set_facet(SURF_STORAGE_LEVEL, nullptr);