diff --git a/src/buildings/test/buildings-channel-condition-model-test.cc b/src/buildings/test/buildings-channel-condition-model-test.cc index 7752ddea5..deb633ffa 100644 --- a/src/buildings/test/buildings-channel-condition-model-test.cc +++ b/src/buildings/test/buildings-channel-condition-model-test.cc @@ -104,7 +104,7 @@ BuildingsChannelConditionModelTestCase::DoRun() Ptr condModel = CreateObject(); - Ptr building = Create(); + auto building = CreateObject(); building->SetNRoomsX(1); building->SetNRoomsY(1); building->SetNFloors(1); diff --git a/src/buildings/test/buildings-penetration-loss-pathloss-test.cc b/src/buildings/test/buildings-penetration-loss-pathloss-test.cc index 3495f0840..852687aad 100644 --- a/src/buildings/test/buildings-penetration-loss-pathloss-test.cc +++ b/src/buildings/test/buildings-penetration-loss-pathloss-test.cc @@ -174,7 +174,7 @@ BuildingsPenetrationLossesTestCase::DoRun() // create the factory for the propagation loss model ObjectFactory propModelFactory; - Ptr building = Create(); + auto building = CreateObject(); building->SetExtWallsType(Building::ExtWallsType_t::ConcreteWithWindows); building->SetNRoomsX(1); building->SetNRoomsY(1); diff --git a/src/buildings/test/three-gpp-v2v-channel-condition-model-test.cc b/src/buildings/test/three-gpp-v2v-channel-condition-model-test.cc index ae4100297..94d3b5dca 100644 --- a/src/buildings/test/three-gpp-v2v-channel-condition-model-test.cc +++ b/src/buildings/test/three-gpp-v2v-channel-condition-model-test.cc @@ -136,7 +136,7 @@ ThreeGppV2vBuildingsChCondModelTestCase::DoRun() Ptr b = CreateObject(); nodes.Get(1)->AggregateObject(b); - Ptr building = Create(); + auto building = CreateObject(); building->SetNRoomsX(1); building->SetNRoomsY(1); building->SetNFloors(1); diff --git a/src/core/test/attribute-test-suite.cc b/src/core/test/attribute-test-suite.cc index 5deb10a4f..980d31fb6 100644 --- a/src/core/test/attribute-test-suite.cc +++ b/src/core/test/attribute-test-suite.cc @@ -1880,7 +1880,7 @@ PointerAttributeTestCase::DoRun() // Now, lets create an Object of type Derived and set the local Ptr to point // to that object. We can then set the PointerValue Attribute to that Ptr. // - derived = Create(); + derived = CreateObject(); bool ok = p->SetAttributeFailSafe("Pointer", PointerValue(derived)); NS_TEST_ASSERT_MSG_EQ(ok, true, diff --git a/src/flow-monitor/helper/flow-monitor-helper.cc b/src/flow-monitor/helper/flow-monitor-helper.cc index 94c067465..f8f00950a 100644 --- a/src/flow-monitor/helper/flow-monitor-helper.cc +++ b/src/flow-monitor/helper/flow-monitor-helper.cc @@ -85,15 +85,16 @@ FlowMonitorHelper::Install(Ptr node) Ptr ipv4 = node->GetObject(); if (ipv4) { - Ptr probe = - Create(monitor, DynamicCast(classifier), node); + auto probe = + CreateObject(monitor, DynamicCast(classifier), node); } Ptr classifier6 = GetClassifier6(); Ptr ipv6 = node->GetObject(); if (ipv6) { - Ptr probe6 = - Create(monitor, DynamicCast(classifier6), node); + auto probe6 = CreateObject(monitor, + DynamicCast(classifier6), + node); } return m_flowMonitor; } diff --git a/src/lte/examples/lena-rem-sector-antenna.cc b/src/lte/examples/lena-rem-sector-antenna.cc index a1296acaa..9950c8914 100644 --- a/src/lte/examples/lena-rem-sector-antenna.cc +++ b/src/lte/examples/lena-rem-sector-antenna.cc @@ -70,7 +70,7 @@ main(int argc, char* argv[]) std::vector enbPosition; Ptr positionAlloc = CreateObject(); Ptr building; - building = Create(); + building = CreateObject(); building->SetBoundaries( Box(0.0, nRooms * roomLength, 0.0, nRooms * roomLength, 0.0, roomHeight)); building->SetBuildingType(Building::Residential); diff --git a/src/mpi/model/remote-channel-bundle-manager.cc b/src/mpi/model/remote-channel-bundle-manager.cc index 717b72456..bd95409a2 100644 --- a/src/mpi/model/remote-channel-bundle-manager.cc +++ b/src/mpi/model/remote-channel-bundle-manager.cc @@ -48,7 +48,7 @@ RemoteChannelBundleManager::Add(uint32_t systemId) NS_ASSERT(!g_initialized); NS_ASSERT(g_remoteChannelBundles.find(systemId) == g_remoteChannelBundles.end()); - Ptr remoteChannelBundle = Create(systemId); + auto remoteChannelBundle = CreateObject(systemId); g_remoteChannelBundles[systemId] = remoteChannelBundle; diff --git a/src/network/utils/packet-burst.cc b/src/network/utils/packet-burst.cc index 8c7c0affd..3eea5e674 100644 --- a/src/network/utils/packet-burst.cc +++ b/src/network/utils/packet-burst.cc @@ -56,7 +56,7 @@ Ptr PacketBurst::Copy() const { NS_LOG_FUNCTION(this); - Ptr burst = Create(); + Ptr burst = CreateObject(); for (auto iter = m_packets.begin(); iter != m_packets.end(); ++iter) { diff --git a/src/olsr/examples/olsr-hna.cc b/src/olsr/examples/olsr-hna.cc index 9edba0ee8..3b1476454 100644 --- a/src/olsr/examples/olsr-hna.cc +++ b/src/olsr/examples/olsr-hna.cc @@ -237,7 +237,7 @@ main(int argc, char* argv[]) { // Create a special Ipv4StaticRouting instance for RoutingTableAssociation // Even the Ipv4StaticRouting instance added to list may be used - Ptr hnaEntries = Create(); + Ptr hnaEntries = CreateObject(); // Add the required routes into the Ipv4StaticRouting Protocol instance // and have the node generate HNA messages for all these routes diff --git a/src/olsr/model/olsr-routing-protocol.cc b/src/olsr/model/olsr-routing-protocol.cc index b4e557482..0fe52d6d0 100644 --- a/src/olsr/model/olsr-routing-protocol.cc +++ b/src/olsr/model/olsr-routing-protocol.cc @@ -252,7 +252,7 @@ RoutingProtocol::RoutingProtocol() { m_uniformRandomVariable = CreateObject(); - m_hnaRoutingTable = Create(); + m_hnaRoutingTable = CreateObject(); } RoutingProtocol::~RoutingProtocol() diff --git a/src/wifi/test/wifi-mac-ofdma-test.cc b/src/wifi/test/wifi-mac-ofdma-test.cc index 1d3aa090c..17efe7f59 100644 --- a/src/wifi/test/wifi-mac-ofdma-test.cc +++ b/src/wifi/test/wifi-mac-ofdma-test.cc @@ -2231,7 +2231,7 @@ OfdmaAckSequenceTest::DoRun() { // create a listening VHT station wifi.SetStandard(WIFI_STANDARD_80211ac); - wifi.Install(phy, mac, Create()); + wifi.Install(phy, mac, CreateObject()); } wifi.SetStandard(m_scenario == WifiOfdmaScenario::HE ? WIFI_STANDARD_80211ax diff --git a/src/wimax/model/bs-net-device.cc b/src/wimax/model/bs-net-device.cc index 5ebb47086..cfb1066ff 100644 --- a/src/wimax/model/bs-net-device.cc +++ b/src/wimax/model/bs-net-device.cc @@ -622,7 +622,7 @@ BaseStationNetDevice::DoSend(Ptr packet, const Mac48Address& dest, uint16_t protocolNumber) { - Ptr burst = Create(); + Ptr burst = CreateObject(); ServiceFlow* serviceFlow = nullptr; NS_LOG_INFO("BS (" << source << "):"); diff --git a/src/wimax/model/bs-scheduler-rtps.cc b/src/wimax/model/bs-scheduler-rtps.cc index cbba2eb8e..e97441f14 100644 --- a/src/wimax/model/bs-scheduler-rtps.cc +++ b/src/wimax/model/bs-scheduler-rtps.cc @@ -164,7 +164,7 @@ BSSchedulerRtps::CreateUgsBurst(ServiceFlow* serviceFlow, Time timeStamp; GenericMacHeader hdr; Ptr packet; - Ptr burst = Create(); + auto burst = CreateObject(); uint32_t nrSymbolsRequired = 0; // serviceFlow->CleanUpQueue (); @@ -211,7 +211,7 @@ BSSchedulerRtps::BSSchedulerBroadcastConnection(uint32_t& availableSymbols) uint32_t nrSymbolsRequired = 0; GenericMacHeader hdr; Ptr packet; - Ptr burst = Create(); + auto burst = CreateObject(); while (GetBs()->GetBroadcastConnection()->HasPackets() && availableSymbols > 0) { @@ -258,7 +258,7 @@ BSSchedulerRtps::BSSchedulerInitialRangingConnection(uint32_t& availableSymbols) uint32_t nrSymbolsRequired = 0; GenericMacHeader hdr; Ptr packet; - Ptr burst = Create(); + auto burst = CreateObject(); while (GetBs()->GetInitialRangingConnection()->HasPackets() && availableSymbols > 0) { @@ -306,7 +306,7 @@ BSSchedulerRtps::BSSchedulerBasicConnection(uint32_t& availableSymbols) uint32_t nrSymbolsRequired = 0; GenericMacHeader hdr; Ptr packet; - Ptr burst = Create(); + auto burst = CreateObject(); std::vector> connections; @@ -353,7 +353,7 @@ BSSchedulerRtps::BSSchedulerBasicConnection(uint32_t& availableSymbols) if (burst->GetNPackets() != 0) { AddDownlinkBurst(connection, diuc, modulationType, burst); - burst = Create(); + burst = CreateObject(); } } } @@ -367,7 +367,7 @@ BSSchedulerRtps::BSSchedulerPrimaryConnection(uint32_t& availableSymbols) uint32_t nrSymbolsRequired = 0; GenericMacHeader hdr; Ptr packet; - Ptr burst = Create(); + auto burst = CreateObject(); std::vector> connections; @@ -427,7 +427,7 @@ BSSchedulerRtps::BSSchedulerUGSConnection(uint32_t& availableSymbols) uint32_t nrSymbolsRequired = 0; GenericMacHeader hdr; Ptr packet; - Ptr burst = Create(); + auto burst = CreateObject(); Time currentTime = Simulator::Now(); @@ -471,7 +471,7 @@ BSSchedulerRtps::BSSchedulerUGSConnection(uint32_t& availableSymbols) AddDownlinkBurst(connection, diuc, modulationType, burst); currentTime = Simulator::Now(); serviceFlowRecord->SetDlTimeStamp(currentTime); - burst = Create(); + burst = CreateObject(); } } } @@ -484,7 +484,7 @@ BSSchedulerRtps::BSSchedulerRTPSConnection(uint32_t& availableSymbols) Ptr connection; GenericMacHeader hdr; Ptr packet; - Ptr burst = Create(); + auto burst = CreateObject(); Time currentTime = Simulator::Now(); @@ -569,7 +569,7 @@ BSSchedulerRtps::BSSchedulerRTPSConnection(uint32_t& availableSymbols) { packet = rtPSConnection[i]->GetQueue()->Peek(hdr); uint32_t symbolsForPacketTransmission = 0; - burst = Create(); + burst = CreateObject(); NS_LOG_INFO("\t\tCID = " << rtPSConnection[i]->GetCid() << " assignedSymbols = " << symbolsRequired[i]); @@ -627,7 +627,7 @@ BSSchedulerRtps::BSSchedulerNRTPSConnection(uint32_t& availableSymbols) uint32_t nrSymbolsRequired = 0; GenericMacHeader hdr; Ptr packet; - Ptr burst = Create(); + auto burst = CreateObject(); std::vector serviceFlows; @@ -670,7 +670,7 @@ BSSchedulerRtps::BSSchedulerNRTPSConnection(uint32_t& availableSymbols) if (burst->GetNPackets() != 0) { AddDownlinkBurst(connection, diuc, modulationType, burst); - burst = Create(); + burst = CreateObject(); } } } @@ -684,7 +684,7 @@ BSSchedulerRtps::BSSchedulerBEConnection(uint32_t& availableSymbols) uint32_t nrSymbolsRequired = 0; GenericMacHeader hdr; Ptr packet; - Ptr burst = Create(); + auto burst = CreateObject(); std::vector serviceFlows; @@ -726,7 +726,7 @@ BSSchedulerRtps::BSSchedulerBEConnection(uint32_t& availableSymbols) if (burst->GetNPackets() != 0) { AddDownlinkBurst(connection, diuc, modulationType, burst); - burst = Create(); + burst = CreateObject(); } } } diff --git a/src/wimax/model/bs-scheduler-simple.cc b/src/wimax/model/bs-scheduler-simple.cc index bac4ecca9..ae8a01af5 100644 --- a/src/wimax/model/bs-scheduler-simple.cc +++ b/src/wimax/model/bs-scheduler-simple.cc @@ -175,7 +175,7 @@ BSSchedulerSimple::Schedule() } else { - burst = Create(); + burst = CreateObject(); while (connection->HasPackets()) { uint32_t FirstPacketSize = connection->GetQueue()->GetFirstPacketRequiredByte( @@ -353,7 +353,7 @@ BSSchedulerSimple::CreateUgsBurst(ServiceFlow* serviceFlow, Time timeStamp; GenericMacHeader hdr; Ptr packet; - Ptr burst = Create(); + auto burst = CreateObject(); uint32_t nrSymbolsRequired = 0; // serviceFlow->CleanUpQueue (); diff --git a/src/wimax/model/simple-ofdm-wimax-phy.cc b/src/wimax/model/simple-ofdm-wimax-phy.cc index d1e3fe13d..8bb4ca5f3 100644 --- a/src/wimax/model/simple-ofdm-wimax-phy.cc +++ b/src/wimax/model/simple-ofdm-wimax-phy.cc @@ -543,7 +543,7 @@ SimpleOfdmWimaxPhy::ConvertBitsToBurst(Bvec buffer) j++; } uint16_t pos = 0; - Ptr RecvBurst = Create(); + Ptr RecvBurst = CreateObject(); while (pos < bufferSize) { uint16_t packetSize = 0; diff --git a/src/wimax/model/ss-link-manager.cc b/src/wimax/model/ss-link-manager.cc index ef5ef8909..45471c693 100644 --- a/src/wimax/model/ss-link-manager.cc +++ b/src/wimax/model/ss-link-manager.cc @@ -202,7 +202,7 @@ SSLinkManager::SendRangingRequest(uint8_t uiuc, uint16_t allocationSize) } Ptr packet = Create(); - Ptr burst = Create(); + Ptr burst = CreateObject(); packet->AddHeader(m_rngreq); packet->AddHeader(ManagementMessageType(ManagementMessageType::MESSAGE_TYPE_RNG_REQ)); diff --git a/src/wimax/model/ss-scheduler.cc b/src/wimax/model/ss-scheduler.cc index f639cec50..ff40f6aac 100644 --- a/src/wimax/model/ss-scheduler.cc +++ b/src/wimax/model/ss-scheduler.cc @@ -70,7 +70,7 @@ SSScheduler::Schedule(uint16_t availableSymbols, Ptr& connection) { Time timeStamp; - Ptr burst = Create(); + Ptr burst = CreateObject(); uint16_t nrSymbolsRequired = 0; if (!connection)