Optimize Buffer::Iterator::CheckNoZero
authorAlexander Krotov <ilabdsf@yandex.ru>
Sun, 26 Jul 2015 19:44:29 +0300
changeset 11553 101842ac3f6b
parent 11552 871104799837
child 11554 f72ea021c419
Optimize Buffer::Iterator::CheckNoZero
src/network/model/buffer.cc
--- a/src/network/model/buffer.cc	Wed Aug 05 15:20:10 2015 -0400
+++ b/src/network/model/buffer.cc	Sun Jul 26 19:44:29 2015 +0300
@@ -825,15 +825,14 @@
 Buffer::Iterator::CheckNoZero (uint32_t start, uint32_t end) const
 {
   NS_LOG_FUNCTION (this << &start << &end);
-  bool ok = true;
   for (uint32_t i = start; i < end; i++)
     {
       if (!Check (i))
         {
-          ok = false;
+          return false;
         }
     }
-  return ok;
+  return true;
 }
 bool 
 Buffer::Iterator::Check (uint32_t i) const