X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ee1477d33506867034463d4d790279340382d7cc..3d162cea6ff3405edc06c1d7f85494eb15f35d82:/examples/cpp/routing-get-clusters/s4u-routing-get-clusters.cpp diff --git a/examples/cpp/routing-get-clusters/s4u-routing-get-clusters.cpp b/examples/cpp/routing-get-clusters/s4u-routing-get-clusters.cpp index 79d36f3820..636762da41 100644 --- a/examples/cpp/routing-get-clusters/s4u-routing-get-clusters.cpp +++ b/examples/cpp/routing-get-clusters/s4u-routing-get-clusters.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2009-2022. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2009-2023. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -18,21 +18,21 @@ int main(int argc, char* argv[]) std::vector clusters = e.get_filtered_netzones(); - for (auto c : clusters) { + for (auto const* c : clusters) { XBT_INFO("%s", c->get_cname()); std::vector hosts = c->get_all_hosts(); - for (auto h : hosts) + for (auto const* h : hosts) XBT_INFO(" %s", h->get_cname()); } std::vector dragonfly_clusters = e.get_filtered_netzones(); - for (auto d : dragonfly_clusters) { + for (auto const* d : dragonfly_clusters) { XBT_INFO("%s' dragonfly topology:", d->get_cname()); - for (int i = 0; i < d->get_host_count(); i++) { + for (size_t i = 0; i < d->get_host_count(); i++) { const simgrid::kernel::routing::DragonflyZone::Coords coords = d->rankId_to_coords(i); - XBT_INFO(" %d: (%lu, %lu, %lu, %lu)", i, coords.group, coords.chassis, coords.blade, coords.node); + XBT_INFO(" %zu: (%lu, %lu, %lu, %lu)", i, coords.group, coords.chassis, coords.blade, coords.node); } }