remove dead code
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Thu, 11 Oct 2007 16:53:42 +0200
changeset 1961 c61eab0e89c4
parent 1960 fb6fc5f9ebe5
child 1962 600b310a3218
remove dead code
src/devices/wifi/wifi-channel.cc
src/devices/wifi/wifi-channel.h
--- a/src/devices/wifi/wifi-channel.cc	Thu Oct 11 16:51:59 2007 +0200
+++ b/src/devices/wifi/wifi-channel.cc	Thu Oct 11 16:53:42 2007 +0200
@@ -29,15 +29,6 @@
 
 namespace ns3 {
 
-WifiChannel::ReceiveData::ReceiveData (const Packet &packet, double rxPowerDbm,
-                                       WifiMode txMode, WifiPreamble preamble)
-  : m_packet (packet),
-    m_rxPowerDbm (rxPowerDbm),
-    m_wifiMode (txMode),
-    m_preamble (preamble)
-{}
-
-
 WifiChannel::WifiChannel ()
   : m_loss (PropagationLossModel::CreateDefault ()),
     m_delay (PropagationDelayModel::CreateDefault ())
@@ -75,19 +66,18 @@
           double distance = senderMobility->GetDistanceFrom (receiverMobility);
           Time delay = m_delay->GetDelay (distance);
           double rxPowerDbm = m_loss->GetRxPower (txPowerDbm, distance);
-          struct ReceiveData data = ReceiveData (packet, rxPowerDbm, wifiMode, preamble);
           Simulator::Schedule (delay, &WifiChannel::Receive, this, 
-                               j, data);
+                               j, packet, rxPowerDbm, wifiMode, preamble);
         }
       j++;
     }
 }
 
 void
-WifiChannel::Receive (uint32_t i,
-                      const struct ReceiveData &data) const
+WifiChannel::Receive (uint32_t i, const Packet &packet, double rxPowerDbm,
+                      WifiMode txMode, WifiPreamble preamble) const
 {
-  m_deviceList[i].second (data.m_packet, data.m_rxPowerDbm, data.m_wifiMode, data.m_preamble);
+  m_deviceList[i].second (packet, rxPowerDbm, txMode, preamble);
 }
 
 uint32_t 
--- a/src/devices/wifi/wifi-channel.h	Thu Oct 11 16:51:59 2007 +0200
+++ b/src/devices/wifi/wifi-channel.h	Thu Oct 11 16:53:42 2007 +0200
@@ -52,16 +52,8 @@
 
 private:
   typedef std::vector<std::pair<Ptr<NetDevice>, ReceiveCallback> > DeviceList;
-  struct ReceiveData {
-    ReceiveData (const Packet &packet, double rxPowerDbm,
-                 WifiMode txMode, WifiPreamble preamble);
-    Packet m_packet;
-    double m_rxPowerDbm;
-    WifiMode m_wifiMode;
-    WifiPreamble m_preamble;
-  };
-  void Receive (uint32_t i, 
-                const struct ReceiveData &data) const;
+  void Receive (uint32_t i, const Packet &packet, double rxPowerDbm,
+                WifiMode txMode, WifiPreamble preamble) const;
 
   DeviceList m_deviceList;
   Ptr<PropagationLossModel> m_loss;