Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Prefer to use emplace_back.
[simgrid.git] / src / surf / network_ns3.cpp
index b6835cd..b44c56a 100644 (file)
@@ -377,8 +377,8 @@ LinkNS3::LinkNS3(NetworkNS3Model* model, const std::string& name, double bandwid
 
     ns3::NetDeviceContainer netA;
     WifiZone* zone = WifiZone::by_name(name);
-    xbt_assert(zone != 0, "Link name '%s' does not match the 'wifi_link' property of a host.", name.c_str());
-    NetPointNs3* netpoint_ns3 = zone->get_host()->get_netpoint()->extension<NetPointNs3>();
+    xbt_assert(zone != nullptr, "Link name '%s' does not match the 'wifi_link' property of a host.", name.c_str());
+    auto* netpoint_ns3 = zone->get_host()->get_netpoint()->extension<NetPointNs3>();
 
     wifi.SetRemoteStationManager("ns3::ConstantRateWifiManager", "ControlMode", ns3::StringValue("HtMcs0"), "DataMode",
                                  ns3::StringValue("HtMcs" + std::to_string(zone->get_mcs())));