Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use (const) references with range-based for loops.
[simgrid.git] / teshsuite / simdag / is-router / is-router.cpp
index a45915e..9858c0c 100644 (file)
@@ -41,7 +41,7 @@ int main(int argc, char **argv)
   xbt_dynar_free(&hosts);
 
   std::printf("NetCards count: %zu\n", netcardList.size());
-  for (auto nc : netcardList)
+  for (auto const& nc : netcardList)
     std::printf("   - Seen: \"%s\". Type: %s\n", nc->cname(),
                 nc->isRouter() ? "router" : (nc->isNetZone() ? "netzone" : (nc->isHost() ? "host" : "buggy")));