~ubuntu-branches/debian/stretch/cgal/stretch

« back to all changes in this revision

Viewing changes to include/CGAL/Filter_circulator.h

  • Committer: Package Import Robot
  • Author(s): Joachim Reichel
  • Date: 2014-04-05 10:56:43 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20140405105643-jgnrpu2thtx23zfs
Tags: 4.4-1
* New upstream release.
* Remove patches do-not-link-example-with-qt4-support-library.patch and
  fix_jet_fitting_3.patch (applied upstream).

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
    }
53
53
 
54
54
  Filter_circulator(const Circ& c, const Pred& p=Pred())
55
 
    : Circ(c), is_null(false), test(p)
 
55
    : test(p)
56
56
    {
57
 
      if(test(static_cast<Circ&>(*this)))
 
57
      Circ circ(c);
 
58
      if(test(circ))
58
59
        is_null=false;
59
60
      else
60
61
        {
61
 
          Self end(*this);
 
62
          Circ end(c);
62
63
          do { 
63
 
            this->Circ::operator++();
64
 
          } while( !test(static_cast<Circ&>(*this)) && (*this)!=end );
65
 
          if((*this)==end)
66
 
            is_null=true;
 
64
            ++circ;
 
65
          } while( !test(circ) && end != circ );
 
66
          is_null = (end == circ);
67
67
        }
 
68
      static_cast<Circ&>(*this) = circ;
 
69
      CGAL_assertion(is_null || test(*this));
68
70
    }
69
71
 
70
72
  bool operator==( Nullptr_t ) const {
87
89
    do {
88
90
      this->Circ::operator++();
89
91
    } while( !test(static_cast<Circ&>(*this)) );
 
92
    CGAL_assertion(is_null || test(static_cast<Circ&>(*this)));
90
93
    return *this;
91
94
  }
92
95