/* 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. */
+#include "simgrid/host.h"
#include "simgrid/kernel/routing/NetPoint.hpp"
#include "simgrid/s4u/Actor.hpp"
#include "simgrid/s4u/Engine.hpp"
{
std::vector<kernel::resource::LinkImpl*> linkImpls;
this->route_to(dest, linkImpls, latency);
- for (kernel::resource::LinkImpl* const& l : linkImpls)
+ for (auto* l : linkImpls)
links.push_back(l->get_iface());
}
if (XBT_LOG_ISENABLED(surf_route, xbt_log_priority_debug)) {
XBT_CDEBUG(surf_route, "Route from '%s' to '%s' (latency: %f):", get_cname(), dest->get_cname(),
(latency == nullptr ? -1 : *latency));
- for (auto const& link : links)
- XBT_CDEBUG(surf_route, "Link %s", link->get_cname());
+ for (auto const* link : links)
+ XBT_CDEBUG(surf_route, " Link '%s'", link->get_cname());
}
}
kernel::actor::simcall([this, &key, &value] { this->pimpl_->set_property(key, value); });
}
-void Host::set_properties(const std::map<std::string, std::string>& properties)
+void Host::set_properties(const std::unordered_map<std::string, std::string>& properties)
{
kernel::actor::simcall([this, &properties] { this->pimpl_->set_properties(properties); });
}
}
sg_host_t* sg_host_list()
{
- simgrid::s4u::Engine* e = simgrid::s4u::Engine::get_instance();
+ const simgrid::s4u::Engine* e = simgrid::s4u::Engine::get_instance();
size_t host_count = e->get_host_count();
xbt_assert(host_count > 0, "There is no host!");
std::vector<simgrid::s4u::Host*> hosts = e->get_all_hosts();