]> AND Public Git Repository - simgrid.git/blobdiff - examples/cpp/io-disk-raw/s4u-io-disk-raw.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'simgrid-udpor-integration' into 'master'
[simgrid.git] / examples / cpp / io-disk-raw / s4u-io-disk-raw.cpp
index f5ce9dda579c37f2f809bceb4c02595552c532c5..8f2fc22adc95bb49fc88cd8a2e333352cc4c6b1f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2017-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2017-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. */
@@ -59,10 +59,10 @@ int main(int argc, char** argv)
   e.load_platform(argv[1]);
 
   /* - Display Host properties */
-  for (auto h : e.get_all_hosts()) {
+  for (auto const* h : e.get_all_hosts()) {
     XBT_INFO("*** %s properties ****", h->get_cname());
-    for (auto const& kv : *h->get_properties())
-      XBT_INFO("  %s -> %s", kv.first.c_str(), kv.second.c_str());
+    for (auto const& [key, value] : *h->get_properties())
+      XBT_INFO("  %s -> %s", key.c_str(), value.c_str());
   }
 
   sg4::Actor::create("", e.host_by_name("bob"), host);