remove un-needed return value
authorMathieu Lacage <mathieu.lacage@cutebugs.net>
Wed, 05 Aug 2015 15:20:10 -0400
changeset 11552 871104799837
parent 11551 c84a84dea37a
child 11553 101842ac3f6b
remove un-needed return value
src/network/model/buffer.cc
src/network/model/buffer.h
--- a/src/network/model/buffer.cc	Wed Aug 05 15:11:19 2015 -0400
+++ b/src/network/model/buffer.cc	Wed Aug 05 15:20:10 2015 -0400
@@ -305,11 +305,10 @@
   return m_end - (m_zeroAreaEnd - m_zeroAreaStart);
 }
 
-bool
+void
 Buffer::AddAtStart (uint32_t start)
 {
   NS_LOG_FUNCTION (this << start);
-  bool dirty;
   NS_ASSERT (CheckInternalState ());
   bool isDirty = m_data->m_count > 1 && m_start > m_data->m_dirtyStart;
   if (m_start >= start && !isDirty)
@@ -321,7 +320,6 @@
        */
       NS_ASSERT (m_data->m_count == 1 || m_start == m_data->m_dirtyStart);
       m_start -= start;
-      dirty = m_start > m_data->m_dirtyStart;
       // update dirty area
       m_data->m_dirtyStart = m_start;
     } 
@@ -347,20 +345,15 @@
       // update dirty area
       m_data->m_dirtyStart = m_start;
       m_data->m_dirtyEnd = m_end;
-
-      dirty = true;
-
     }
   m_maxZeroAreaStart = std::max (m_maxZeroAreaStart, m_zeroAreaStart);
   LOG_INTERNAL_STATE ("add start=" << start << ", ");
   NS_ASSERT (CheckInternalState ());
-  return dirty;
 }
-bool
+void
 Buffer::AddAtEnd (uint32_t end)
 {
   NS_LOG_FUNCTION (this << end);
-  bool dirty;
   NS_ASSERT (CheckInternalState ());
   bool isDirty = m_data->m_count > 1 && m_end < m_data->m_dirtyEnd;
   if (GetInternalEnd () + end <= m_data->m_size && !isDirty)
@@ -374,9 +367,6 @@
       m_end += end;
       // update dirty area.
       m_data->m_dirtyEnd = m_end;
-
-      dirty = m_end < m_data->m_dirtyEnd;
-
     } 
   else
     {
@@ -400,15 +390,10 @@
       // update dirty area
       m_data->m_dirtyStart = m_start;
       m_data->m_dirtyEnd = m_end;
-
-      dirty = true;
-
     } 
   m_maxZeroAreaStart = std::max (m_maxZeroAreaStart, m_zeroAreaStart);
   LOG_INTERNAL_STATE ("add end=" << end << ", ");
   NS_ASSERT (CheckInternalState ());
-
-  return dirty;
 }
 
 void
--- a/src/network/model/buffer.h	Wed Aug 05 15:11:19 2015 -0400
+++ b/src/network/model/buffer.h	Wed Aug 05 15:20:10 2015 -0400
@@ -496,7 +496,6 @@
 
   /**
    * \param start size to reserve
-   * \returns true if the buffer needed resizing, false otherwise.
    *
    * Add bytes at the start of the Buffer. The
    * content of these bytes is undefined but debugging
@@ -504,10 +503,9 @@
    * Any call to this method invalidates any Iterator
    * pointing to this Buffer.
    */
-  bool AddAtStart (uint32_t start);
+  void AddAtStart (uint32_t start);
   /**
    * \param end size to reserve
-   * \returns true if the buffer needed resizing, false otherwise.
    *
    * Add bytes at the end of the Buffer. The
    * content of these bytes is undefined but debugging
@@ -515,7 +513,7 @@
    * Any call to this method invalidates any Iterator
    * pointing to this Buffer.
    */
-  bool AddAtEnd (uint32_t end);
+  void AddAtEnd (uint32_t end);
 
   /**
    * \param o the buffer to append to the end of this buffer.