X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f6b6ec5ae0cc5d28201720961c23277c4a72e152..5dd78326c18ad61561204c0d11470890cd12d091:/src/s4u/s4u_Netzone.cpp diff --git a/src/s4u/s4u_Netzone.cpp b/src/s4u/s4u_Netzone.cpp index f1ebe44aff..139baf6d36 100644 --- a/src/s4u/s4u_Netzone.cpp +++ b/src/s4u/s4u_Netzone.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2006-2022. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2006-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. */ @@ -39,7 +39,7 @@ void NetZone::set_property(const std::string& key, const std::string& value) std::vector NetZone::get_children() const { std::vector res; - for (auto child : pimpl_->get_children()) + for (auto* child : pimpl_->get_children()) res.push_back(child->get_iface()); return res; } @@ -116,14 +116,14 @@ NetZone* NetZone::seal() void NetZone::set_latency_factor_cb( std::function& /*links*/, - const std::unordered_set& /*netzones*/)> const& cb) + const std::unordered_set& /*netzones*/)> const& cb) const { kernel::actor::simcall_answered([this, &cb]() { pimpl_->get_network_model()->set_lat_factor_cb(cb); }); } void NetZone::set_bandwidth_factor_cb( std::function& /*links*/, - const std::unordered_set& /*netzones*/)> const& cb) + const std::unordered_set& /*netzones*/)> const& cb) const { kernel::actor::simcall_answered([this, &cb]() { pimpl_->get_network_model()->set_bw_factor_cb(cb); }); } @@ -170,8 +170,8 @@ s4u::SplitDuplexLink* NetZone::create_split_duplex_link(const std::string& name, try { speed = xbt_parse_get_bandwidth("", 0, bandwidth, ""); } catch (const simgrid::ParseError&) { - throw std::invalid_argument(std::string("Impossible to create split-duplex link: ") + name + - std::string(". Invalid bandwidth: ") + bandwidth); + throw std::invalid_argument("Impossible to create split-duplex link: " + name + + ". Invalid bandwidth: " + bandwidth); } return create_split_duplex_link(name, speed); } @@ -191,8 +191,7 @@ s4u::Link* NetZone::create_link(const std::string& name, const std::vector