Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Prefer initialization list.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sun, 20 Oct 2019 19:13:44 +0000 (21:13 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sun, 20 Oct 2019 20:53:14 +0000 (22:53 +0200)
src/surf/network_ns3.cpp

index 9e9aa53..1e14879 100644 (file)
@@ -55,9 +55,8 @@ static int number_of_networks = 1;
 
 simgrid::xbt::Extension<simgrid::kernel::routing::NetPoint, NetPointNs3> NetPointNs3::EXTENSION_ID;
 
-NetPointNs3::NetPointNs3()
+NetPointNs3::NetPointNs3() : ns3_node_(ns3::CreateObject<ns3::Node>(0))
 {
-  ns3_node_ = ns3::CreateObject<ns3::Node>(0);
   stack.Install(ns3_node_);
   nodes.Add(ns3_node_);
   node_num = number_of_nodes++;