remove some redundant clean ups, includes ns-3.6-RC3
authorAndrey Mazo <mazo@iitp.ru>
Thu, 15 Oct 2009 14:32:19 +0400
changeset 542379ff6ad1adbb
parent 5422 21a4f34518ff
child 5424 fa11f164d421
remove some redundant clean ups, includes
src/devices/mesh/dot11s/ie-dot11s-beacon-timing.cc
src/devices/mesh/dot11s/ie-dot11s-preq.cc
src/devices/mesh/mesh-wifi-beacon.h
src/devices/mesh/wifi-information-element-vector.cc
src/devices/wifi/interference-helper.cc
     1.1 --- a/src/devices/mesh/dot11s/ie-dot11s-beacon-timing.cc	Thu Oct 15 14:10:02 2009 +0400
     1.2 +++ b/src/devices/mesh/dot11s/ie-dot11s-beacon-timing.cc	Thu Oct 15 14:32:19 2009 +0400
     1.3 @@ -118,19 +118,11 @@
     1.4  void
     1.5  IeBeaconTiming::ClearTimingElement ()
     1.6  {
     1.7 -  uint16_t to_delete = 0;
     1.8 -  uint16_t i;
     1.9    for (NeighboursTimingUnitsList::iterator j = m_neighbours.begin (); j != m_neighbours.end (); j++)
    1.10      {
    1.11 -      to_delete++;
    1.12        (*j) = 0;
    1.13      }
    1.14 -  for (i = 0; i < to_delete; i++)
    1.15 -    {
    1.16 -      m_neighbours.pop_back ();
    1.17 -    }
    1.18    m_neighbours.clear ();
    1.19 -
    1.20  }
    1.21  uint8_t
    1.22  IeBeaconTiming::GetInformationSize () const
     2.1 --- a/src/devices/mesh/dot11s/ie-dot11s-preq.cc	Thu Oct 15 14:10:02 2009 +0400
     2.2 +++ b/src/devices/mesh/dot11s/ie-dot11s-preq.cc	Thu Oct 15 14:32:19 2009 +0400
     2.3 @@ -373,16 +373,11 @@
     2.4  void
     2.5  IePreq::ClearDestinationAddressElements ()
     2.6  {
     2.7 -  int i;
     2.8    for (std::vector<Ptr<DestinationAddressUnit> >::iterator j = m_destinations.begin (); j
     2.9        != m_destinations.end (); j++)
    2.10      {
    2.11        (*j) = 0;
    2.12      }
    2.13 -  for (i = 0; i < m_destCount; i++)
    2.14 -    {
    2.15 -      m_destinations.pop_back ();
    2.16 -    }
    2.17    m_destinations.clear ();
    2.18    m_destCount = 0;
    2.19  }
     3.1 --- a/src/devices/mesh/mesh-wifi-beacon.h	Thu Oct 15 14:10:02 2009 +0400
     3.2 +++ b/src/devices/mesh/mesh-wifi-beacon.h	Thu Oct 15 14:32:19 2009 +0400
     3.3 @@ -27,8 +27,6 @@
     3.4  #include "ns3/wifi-mac-header.h"
     3.5  #include "ns3/wifi-information-element-vector.h"
     3.6  
     3.7 -#include <vector>
     3.8 -
     3.9  namespace ns3 {
    3.10  
    3.11  /**
     4.1 --- a/src/devices/mesh/wifi-information-element-vector.cc	Thu Oct 15 14:10:02 2009 +0400
     4.2 +++ b/src/devices/mesh/wifi-information-element-vector.cc	Thu Oct 15 14:32:19 2009 +0400
     4.3 @@ -74,7 +74,7 @@
     4.4  void
     4.5  WifiInformationElementVector::Serialize (Buffer::Iterator start) const
     4.6  {
     4.7 -  for(std::vector<Ptr<WifiInformationElement> >::const_iterator i = m_elements.begin (); i != m_elements.end (); i ++)
     4.8 +  for(IE_VECTOR::const_iterator i = m_elements.begin (); i != m_elements.end (); i ++)
     4.9      {
    4.10        start.WriteU8((*i)->ElementId ());
    4.11        start.WriteU8 ((*i)->GetInformationSize ());
     5.1 --- a/src/devices/wifi/interference-helper.cc	Thu Oct 15 14:10:02 2009 +0400
     5.2 +++ b/src/devices/wifi/interference-helper.cc	Thu Oct 15 14:32:19 2009 +0400
     5.3 @@ -611,7 +611,7 @@
     5.4      {
     5.5        *i = 0;
     5.6      }
     5.7 -  m_events.erase (m_events.begin (), m_events.end ());
     5.8 +  m_events.clear ();
     5.9  }
    5.10  
    5.11  void