X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8f7ec2e4b08cd2b27aa34b2c9fec2af0ad79d53a..6ca5c122412a958bea1a85b6a67248003d0e6564:/src/surf/network_ns3.cpp diff --git a/src/surf/network_ns3.cpp b/src/surf/network_ns3.cpp index a3ad27a84d..222766f624 100644 --- a/src/surf/network_ns3.cpp +++ b/src/surf/network_ns3.cpp @@ -145,7 +145,7 @@ static void zoneCreation_cb(simgrid::s4u::NetZone const& zone) double angle = 0; auto nb_stations = static_cast(wifizone->get_all_hosts().size() - 1); double step = 2 * M_PI / nb_stations; - for (auto station_host : wifizone->get_all_hosts()) { + for (const auto* station_host : wifizone->get_all_hosts()) { station_netpoint_ns3 = station_host->get_netpoint()->extension(); if (station_netpoint_ns3 == access_point_netpoint_ns3) continue; @@ -308,8 +308,7 @@ static simgrid::config::Flag ns3_seed( }); namespace simgrid { -namespace kernel { -namespace resource { +namespace kernel::resource { NetworkNS3Model::NetworkNS3Model(const std::string& name) : NetworkModel(name) { @@ -322,8 +321,7 @@ NetworkNS3Model::NetworkNS3Model(const std::string& name) : NetworkModel(name) ns3::Config::SetDefault("ns3::TcpSocket::DelAckCount", ns3::UintegerValue(1)); ns3::Config::SetDefault("ns3::TcpSocketBase::Timestamp", ns3::BooleanValue(false)); - auto const& TcpProtocol = ns3_tcp_model.get(); - if (TcpProtocol == "default") { + if (auto const& TcpProtocol = ns3_tcp_model.get(); TcpProtocol == "default") { /* nothing to do */ } else if (TcpProtocol == "Reno" || TcpProtocol == "NewReno" || TcpProtocol == "Tahoe") { @@ -571,8 +569,7 @@ void NetworkNS3Action::update_remains_lazy(double /*now*/) THROW_IMPOSSIBLE; } -} // namespace resource -} // namespace kernel +} // namespace kernel::resource ns3::Ptr get_ns3node_from_sghost(const simgrid::s4u::Host* host) {