diff --git a/src/wifi/helper/spectrum-wifi-helper.cc b/src/wifi/helper/spectrum-wifi-helper.cc index 2822c30f1..238d46011 100644 --- a/src/wifi/helper/spectrum-wifi-helper.cc +++ b/src/wifi/helper/spectrum-wifi-helper.cc @@ -61,13 +61,13 @@ SpectrumWifiPhyHelper::Create (Ptr node, Ptr device) const phy->SetErrorRateModel (error); if (m_frameCaptureModel.IsTypeIdSet ()) { - Ptr capture = m_frameCaptureModel.Create (); - phy->SetFrameCaptureModel (capture); + auto frameCapture = m_frameCaptureModel.Create (); + phy->SetFrameCaptureModel (frameCapture); } if (m_preambleDetectionModel.IsTypeIdSet ()) { - Ptr capture = m_preambleDetectionModel.Create (); - phy->SetPreambleDetectionModel (capture); + auto preambleDetection = m_preambleDetectionModel.Create (); + phy->SetPreambleDetectionModel (preambleDetection); } phy->SetChannel (m_channel); phy->SetDevice (device); diff --git a/src/wifi/helper/yans-wifi-helper.cc b/src/wifi/helper/yans-wifi-helper.cc index b6dfe4956..921a3b634 100644 --- a/src/wifi/helper/yans-wifi-helper.cc +++ b/src/wifi/helper/yans-wifi-helper.cc @@ -151,13 +151,13 @@ YansWifiPhyHelper::Create (Ptr node, Ptr device) const phy->SetErrorRateModel (error); if (m_frameCaptureModel.IsTypeIdSet ()) { - Ptr capture = m_frameCaptureModel.Create (); - phy->SetFrameCaptureModel (capture); + auto frameCapture = m_frameCaptureModel.Create (); + phy->SetFrameCaptureModel (frameCapture); } if (m_preambleDetectionModel.IsTypeIdSet ()) { - Ptr capture = m_preambleDetectionModel.Create (); - phy->SetPreambleDetectionModel (capture); + auto preambleDetection = m_preambleDetectionModel.Create (); + phy->SetPreambleDetectionModel (preambleDetection); } phy->SetChannel (m_channel); phy->SetDevice (device);