Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
provide a simpler API of Engine::getHostList (returning the structure) and use it
[simgrid.git] / examples / s4u / dht-chord / s4u-dht-chord.cpp
index 5c819f1..f18cf54 100644 (file)
@@ -28,8 +28,7 @@ static void chord_init()
 
   HostChord::EXTENSION_ID = simgrid::s4u::Host::extension_create<HostChord>();
 
-  std::vector<simgrid::s4u::Host*> list;
-  simgrid::s4u::Engine::getInstance()->getHostList(&list);
+  std::vector<simgrid::s4u::Host*> list = simgrid::s4u::Engine::getInstance()->getHostList();
   for (auto const& host : list)
     host->extension_set(new HostChord(host));
 }