remove some redundant clean ups, includes ns-3.6-RC3
authorAndrey Mazo <mazo@iitp.ru>
Thu, 15 Oct 2009 14:32:19 +0400
changeset 5423 79ff6ad1adbb
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
--- a/src/devices/mesh/dot11s/ie-dot11s-beacon-timing.cc	Thu Oct 15 14:10:02 2009 +0400
+++ b/src/devices/mesh/dot11s/ie-dot11s-beacon-timing.cc	Thu Oct 15 14:32:19 2009 +0400
@@ -118,19 +118,11 @@
 void
 IeBeaconTiming::ClearTimingElement ()
 {
-  uint16_t to_delete = 0;
-  uint16_t i;
   for (NeighboursTimingUnitsList::iterator j = m_neighbours.begin (); j != m_neighbours.end (); j++)
     {
-      to_delete++;
       (*j) = 0;
     }
-  for (i = 0; i < to_delete; i++)
-    {
-      m_neighbours.pop_back ();
-    }
   m_neighbours.clear ();
-
 }
 uint8_t
 IeBeaconTiming::GetInformationSize () const
--- a/src/devices/mesh/dot11s/ie-dot11s-preq.cc	Thu Oct 15 14:10:02 2009 +0400
+++ b/src/devices/mesh/dot11s/ie-dot11s-preq.cc	Thu Oct 15 14:32:19 2009 +0400
@@ -373,16 +373,11 @@
 void
 IePreq::ClearDestinationAddressElements ()
 {
-  int i;
   for (std::vector<Ptr<DestinationAddressUnit> >::iterator j = m_destinations.begin (); j
       != m_destinations.end (); j++)
     {
       (*j) = 0;
     }
-  for (i = 0; i < m_destCount; i++)
-    {
-      m_destinations.pop_back ();
-    }
   m_destinations.clear ();
   m_destCount = 0;
 }
--- a/src/devices/mesh/mesh-wifi-beacon.h	Thu Oct 15 14:10:02 2009 +0400
+++ b/src/devices/mesh/mesh-wifi-beacon.h	Thu Oct 15 14:32:19 2009 +0400
@@ -27,8 +27,6 @@
 #include "ns3/wifi-mac-header.h"
 #include "ns3/wifi-information-element-vector.h"
 
-#include <vector>
-
 namespace ns3 {
 
 /**
--- a/src/devices/mesh/wifi-information-element-vector.cc	Thu Oct 15 14:10:02 2009 +0400
+++ b/src/devices/mesh/wifi-information-element-vector.cc	Thu Oct 15 14:32:19 2009 +0400
@@ -74,7 +74,7 @@
 void
 WifiInformationElementVector::Serialize (Buffer::Iterator start) const
 {
-  for(std::vector<Ptr<WifiInformationElement> >::const_iterator i = m_elements.begin (); i != m_elements.end (); i ++)
+  for(IE_VECTOR::const_iterator i = m_elements.begin (); i != m_elements.end (); i ++)
     {
       start.WriteU8((*i)->ElementId ());
       start.WriteU8 ((*i)->GetInformationSize ());
--- a/src/devices/wifi/interference-helper.cc	Thu Oct 15 14:10:02 2009 +0400
+++ b/src/devices/wifi/interference-helper.cc	Thu Oct 15 14:32:19 2009 +0400
@@ -611,7 +611,7 @@
     {
       *i = 0;
     }
-  m_events.erase (m_events.begin (), m_events.end ());
+  m_events.clear ();
 }
 
 void