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 / app-token-ring / s4u-app-token-ring.cpp
index 388e19f..893e6df 100644 (file)
@@ -60,8 +60,7 @@ int main(int argc, char** argv)
 
   XBT_INFO("Number of hosts '%zu'", e.getHostCount());
   int id = 0;
-  std::vector<simgrid::s4u::Host*> list;
-  e.getHostList(&list);
+  std::vector<simgrid::s4u::Host*> list = e.getHostList();
   for (auto const& host : list) {
     /* - Give a unique rank to each host and create a @ref relay_runner process on each */
     simgrid::s4u::Actor::createActor((std::to_string(id)).c_str(), host, RelayRunner());