Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
hide a (grave) warning in the tests
[simgrid.git] / src / instr / jedule / jedule_platform.cpp
index 1590106..acc3e9b 100644 (file)
@@ -61,20 +61,16 @@ void Container::addResources(std::vector<sg_host_t> hosts)
 
 void Container::createHierarchy(sg_netzone_t from_as)
 {
-  xbt_dict_cursor_t cursor = nullptr;
-  char* key;
-  sg_netzone_t elem;
-  xbt_dict_t routing_sons = from_as->children();
 
-  if (xbt_dict_is_empty(routing_sons)) {
+  if (from_as->children()->empty()) {
     // I am no AS
     // add hosts to jedule platform
     this->addResources(*from_as->hosts());
   } else {
-    xbt_dict_foreach(routing_sons, cursor, key, elem) {
-      jed_container_t child_container = new simgrid::jedule::Container(std::string(elem->name()));
+    for (auto nz : *from_as->children()) {
+      jed_container_t child_container = new simgrid::jedule::Container(std::string(nz->name()));
       this->addChild(child_container);
-      child_container->createHierarchy(elem);
+      child_container->createHierarchy(nz);
     }
   }
 }