Skip to content

Commit

Permalink
wifi: optimize WifiPpdu destructor
Browse files Browse the repository at this point in the history
  • Loading branch information
tolikzinovyev authored and Stefano Avallone committed Oct 29, 2024
1 parent c181a26 commit ee139e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
9 changes: 0 additions & 9 deletions src/wifi/model/wifi-ppdu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,6 @@ WifiPpdu::WifiPpdu(const WifiConstPsduMap& psdus,
m_psdus = psdus;
}

WifiPpdu::~WifiPpdu()
{
for (auto& psdu : m_psdus)
{
psdu.second = nullptr;
}
m_psdus.clear();
}

const WifiTxVector&
WifiPpdu::GetTxVector() const
{
Expand Down
4 changes: 2 additions & 2 deletions src/wifi/model/wifi-ppdu.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#ifndef WIFI_PPDU_H
#define WIFI_PPDU_H

#include "wifi-psdu.h"
#include "wifi-tx-vector.h"

#include "ns3/nstime.h"
Expand All @@ -29,7 +30,6 @@ namespace ns3
{

class Packet;
class WifiPsdu;
class WifiPhyOperatingChannel;

/**
Expand Down Expand Up @@ -73,7 +73,7 @@ class WifiPpdu : public SimpleRefCount<WifiPpdu>
/**
* Destructor for WifiPpdu.
*/
virtual ~WifiPpdu();
virtual ~WifiPpdu() = default;

/**
* Get the TXVECTOR used to send the PPDU.
Expand Down

0 comments on commit ee139e4

Please sign in to comment.