예제 #1
0
 void move_to_next_valid()
 {
     iter_t& it = this->base_reference();
     pred_t& bi_pred = *this;
     if (it != m_last)
     {
         if (default_pass)
         {
             iter_t nxt = ::pdalboost::next(it);
             while (nxt != m_last && !bi_pred(*it, *nxt))
             {
                 ++it;
                 ++nxt;
             }
         }
         else
         {
             iter_t nxt = ::pdalboost::next(it);
             for(; nxt != m_last; ++it, ++nxt)
             {
                 if (bi_pred(*it, *nxt))
                 {
                     break;
                 }
             }
             if (nxt == m_last)
             {
                 it = m_last;
             }
         }
     }
 }
예제 #2
0
 void increment()
 {
     iter_t& it = this->base_reference();
     BOOST_ASSERT( it != m_last );
     pred_t& bi_pred = *this;
     iter_t prev = it;
     ++it;
     if (it != m_last)
     {
         if (default_pass)
         {
             while (it != m_last && !bi_pred(*prev, *it))
             {
                 ++it;
                 ++prev;
             }
         }
         else
         {
             for (; it != m_last; ++it, ++prev)
             {
                 if (bi_pred(*prev, *it))
                 {
                     break;
                 }
             }
         }
     }
 }