diff --git a/src/wifi/model/interference-helper.cc b/src/wifi/model/interference-helper.cc index 2a67fcc38..13ac82914 100644 --- a/src/wifi/model/interference-helper.cc +++ b/src/wifi/model/interference-helper.cc @@ -38,12 +38,12 @@ NS_LOG_COMPONENT_DEFINE ("InterferenceHelper"); * PHY event class ****************************************************************/ -Event::Event (Ptr ppdu, const WifiTxVector& txVector, Time duration, RxPowerWattPerChannelBand& rxPower) +Event::Event (Ptr ppdu, const WifiTxVector& txVector, Time duration, RxPowerWattPerChannelBand&& rxPower) : m_ppdu (ppdu), m_txVector (txVector), m_startTime (Simulator::Now ()), m_endTime (m_startTime + duration), - m_rxPowerW (rxPower) + m_rxPowerW (std::move (rxPower)) { } @@ -189,7 +189,7 @@ InterferenceHelper::~InterferenceHelper () Ptr InterferenceHelper::Add (Ptr ppdu, const WifiTxVector& txVector, Time duration, RxPowerWattPerChannelBand& rxPowerW, bool isStartOfdmaRxing) { - Ptr event = Create (ppdu, txVector, duration, rxPowerW); + Ptr event = Create (ppdu, txVector, duration, std::move (rxPowerW)); AppendEvent (event, isStartOfdmaRxing); return event; } diff --git a/src/wifi/model/interference-helper.h b/src/wifi/model/interference-helper.h index c1cc2bf5d..c170dfa4c 100644 --- a/src/wifi/model/interference-helper.h +++ b/src/wifi/model/interference-helper.h @@ -38,14 +38,15 @@ class Event : public SimpleRefCount { public: /** - * Create an Event with the given parameters. + * Create an Event with the given parameters. Note that rxPower will + * be moved into this object. * * \param ppdu the PPDU * \param txVector the TXVECTOR * \param duration duration of the PPDU * \param rxPower the received power per band (W) */ - Event (Ptr ppdu, const WifiTxVector& txVector, Time duration, RxPowerWattPerChannelBand& rxPower); + Event (Ptr ppdu, const WifiTxVector& txVector, Time duration, RxPowerWattPerChannelBand&& rxPower); ~Event (); /**