Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cut the backtrace displayed from sthread to the sthread_create to hide useless cruft
[simgrid.git] / examples / cpp / dht-kademlia / answer.cpp
index 92b40f71b46be6aa0335023b2ae4ad586cf2ad6d..f7eabef890b18e92ef4d4890bd8f443533d1b51a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2021. The SimGrid Team.
+/* Copyright (c) 2012-2023. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -15,8 +15,8 @@ void Answer::print() const
 {
   XBT_INFO("Searching %08x, size %zu", destination_id_, nodes_.size());
   unsigned int i = 0;
-  for (auto const& contact : nodes_)
-    XBT_INFO("Node %08x: %08x is at distance %u", i++, contact.first, contact.second);
+  for (auto const& [contact, distance] : nodes_)
+    XBT_INFO("Node %08x: %08x is at distance %u", i++, contact, distance);
 }
 
 /** @brief Merge two answers together, only keeping the best nodes