Replaced all uses of predecessor/successor with prev/next.

This commit is contained in:
Philipp Möller 2011-06-07 16:21:58 +00:00
parent c46c4460bc
commit 8eb30ef805
14 changed files with 31 additions and 31 deletions

View File

@ -78,7 +78,7 @@ struct Interval_evaluate_1 : public std::binary_function
Coefficient_const_iterator_range range =
typename PT_1::Construct_coefficient_const_iterator_range()(p);
Coefficient_const_iterator it = CGAL::predecessor(range.second);
Coefficient_const_iterator it = CGAL::cpp0x::prev(range.second);
Coercion_interval res(cast(*it));

View File

@ -86,7 +86,7 @@ public:
Coefficient_const_iterator_range range =
typename PT_2::Construct_coefficient_const_iterator_range()(p);
Coefficient_const_iterator it = CGAL::predecessor(range.second);
Coefficient_const_iterator it = CGAL::cpp0x::prev(range.second);
Interval_result_type initial_pair = interval_evaluate_1(*it,x_pair);
Coercion_interval res(initial_pair.first,initial_pair.second);

View File

@ -943,7 +943,7 @@ bool read_bezier ( QString aFileName, Bezier_polygon_set& rSet, Bezier_region_so
if ( bezier_polygons.size() > 1 )
{
for ( Bezier_polygon_vector::const_iterator it = CGAL::successor(bezier_polygons.begin())
for ( Bezier_polygon_vector::const_iterator it = CGAL::cpp0x::next(bezier_polygons.begin())
; it != bezier_polygons.end()
; ++ it
)

View File

@ -166,7 +166,7 @@ bool read_bezier ( char const* aFileName, Bezier_polygon_set& rSet )
if ( polygons.size() > 1 )
{
Bezier_polygon_vector::const_iterator it;
for ( it = CGAL::successor(polygons.begin()); it != polygons.end();
for ( it = CGAL::cpp0x::next(polygons.begin()); it != polygons.end();
++ it )
pwh.add_hole(*it);
}

View File

@ -93,13 +93,13 @@ ch_akl_toussaint(ForwardIterator first, ForwardIterator last,
#else
Tee_for_output_iterator<OutputIterator,Point_2> res(result);
#endif // no postconditions ...
std::sort( successor(region1.begin() ), region1.end(),
std::sort( cpp0x::next(region1.begin() ), region1.end(),
ch_traits.less_xy_2_object() );
std::sort( successor(region2.begin() ), region2.end(),
std::sort( cpp0x::next(region2.begin() ), region2.end(),
ch_traits.less_xy_2_object() );
std::sort( successor(region3.begin() ), region3.end(),
std::sort( cpp0x::next(region3.begin() ), region3.end(),
boost::bind(ch_traits.less_xy_2_object(), _2, _1) );
std::sort( successor(region4.begin() ), region4.end(),
std::sort( cpp0x::next(region4.begin() ), region4.end(),
boost::bind(ch_traits.less_xy_2_object(), _2, _1) );
if (! equal_points(*w,*s) )

View File

@ -158,8 +158,8 @@ ch_bykat_with_threshold(InputIterator first, InputIterator last,
P.push_back(Point_2() );
std::copy(first,last,std::back_inserter(P));
P.push_back(Point_2() );
Pbegin = successor(P.begin());
Pend = predecessor(P.end());
Pbegin = cpp0x::next(P.begin());
Pend = cpp0x::prev(P.end());
ch_we_point(Pbegin, Pend, l, r, ch_traits);
Point_2 a = *l;
Point_2 b = *r;
@ -200,15 +200,15 @@ ch_bykat_with_threshold(InputIterator first, InputIterator last,
std::swap( b, *++r);
if ( ch_traits.less_xy_2_object()(*l,*r) )
{
std::sort(successor(l), r,
std::sort(cpp0x::next(l), r,
ch_traits.less_xy_2_object() );
}
else
{
std::sort(successor(l), r,
std::sort(cpp0x::next(l), r,
boost::bind(ch_traits.less_xy_2_object(), _2, _1) );
}
ch__ref_graham_andrew_scan(l, successor(r), res, ch_traits);
ch__ref_graham_andrew_scan(l, cpp0x::next(r), res, ch_traits);
std::swap( a, *l);
std::swap( b, *r);
if ( L.empty() ) break;

View File

@ -53,7 +53,7 @@ ch__recursive_eddy(List& L,
!= b_it );
ListIterator f_it = successor(a_it);
ListIterator f_it = cpp0x::next(a_it);
Less_dist less_dist = ch_traits.less_signed_distance_to_line_2_object();
ListIterator
c_it = std::min_element( f_it, b_it, // max before
@ -65,11 +65,11 @@ ch__recursive_eddy(List& L,
c_it = L.insert(c_it, c);
L.erase( f_it, b_it );
if ( successor(a_it) != c_it )
if ( cpp0x::next(a_it) != c_it )
{
ch__recursive_eddy( L, a_it, c_it, ch_traits);
}
if ( successor(c_it) != b_it )
if ( cpp0x::next(c_it) != b_it )
{
ch__recursive_eddy( L, c_it, b_it, ch_traits);
}
@ -112,7 +112,7 @@ ch_eddy(InputIterator first, InputIterator last,
L.push_front(wp);
e = L.insert(e, ep);
if ( successor(L.begin()) != e )
if ( cpp0x::next(L.begin()) != e )
{
ch__recursive_eddy( L, L.begin(), e, ch_traits);
}

View File

@ -49,7 +49,7 @@ ch_graham_andrew_scan( BidirectionalIterator first,
BidirectionalIterator beta;
BidirectionalIterator iter;
CGAL_ch_precondition( first != last );
CGAL_ch_precondition( successor(first) != last );
CGAL_ch_precondition( cpp0x::next(first) != last );
--last;
CGAL_ch_precondition( *first != *last );
@ -144,7 +144,7 @@ ch__ref_graham_andrew_scan( BidirectionalIterator first,
BidirectionalIterator beta;
BidirectionalIterator iter;
CGAL_ch_precondition( first != last );
CGAL_ch_precondition( successor(first) != last );
CGAL_ch_precondition( cpp0x::next(first) != last );
--last;
CGAL_ch_precondition(! equal_points(*first,*last) );

View File

@ -155,7 +155,7 @@ ch_brute_force_check_2(ForwardIterator1 first1, ForwardIterator1 last1,
if ( first2 == last2) return false;
if ( successor(first2) == last2 )
if ( cpp0x::next(first2) == last2 )
{
while (first1 != last1)
{
@ -200,7 +200,7 @@ ch_brute_force_chain_check_2(ForwardIterator1 first1,
if ( first2 == last2) return false;
if ( successor(first2) == last2 ) return true;
if ( cpp0x::next(first2) == last2 ) return true;
Left_turn_2 left_turn = ch_traits.left_turn_2_object();
iter22 = first2;

View File

@ -61,7 +61,7 @@ si_brute_force_II(ForwardIterator first, ForwardIterator last,
Orientation orientation = traits.orientation_2_object();
for ( ForwardIterator outer = first; outer != last; ++outer)
for ( ForwardIterator inner = successor(outer); inner != last; ++inner)
for ( ForwardIterator inner = cpp0x::next(outer); inner != last; ++inner)
{
Point s1 = (*outer).source();
Point e1 = (*outer).target();

View File

@ -122,7 +122,7 @@ public:
while ( lCurrVertex != aVerticesEnd )
{
XY_Iterator lNextVertex = ( lCurrVertex == lLastVertex ? lFirstVertex : CGAL::successor(lCurrVertex) ) ;
XY_Iterator lNextVertex = ( lCurrVertex == lLastVertex ? lFirstVertex : CGAL::cpp0x::next(lCurrVertex) ) ;
add_segment_2 ( *lCurrVertex, *lNextVertex, aLayer, aColor ) ;

View File

@ -1479,7 +1479,7 @@ void Straight_skeleton_builder_2<Gt,Ss,V>::RelinkBisectorsAroundMultinode( Verte
first_he->HBase_base::set_vertex(v0);
for ( typename Halfedge_handle_vector::iterator i = successor(aLinks.begin()), ei = aLinks.end(); i != ei ; ++ i )
for ( typename Halfedge_handle_vector::iterator i = cpp0x::next(aLinks.begin()), ei = aLinks.end(); i != ei ; ++ i )
{
Halfedge_handle he = *i ;

View File

@ -53,14 +53,14 @@ boost::optional< typename Traits::FT > compute_outer_frame_margin ( ForwardPoint
FT lMaxSDist(0.0) ;
ForwardPointIterator lLast = CGAL::predecessor(aEnd) ;
ForwardPointIterator lLast = CGAL::cpp0x::prev(aEnd) ;
bool lOverflow = false ;
for ( ForwardPointIterator lCurr = aBegin ; lCurr != aEnd ; ++ lCurr )
{
ForwardPointIterator lPrev = ( lCurr == aBegin ? lLast : CGAL::predecessor(lCurr) ) ;
ForwardPointIterator lNext = ( lCurr == lLast ? aBegin : CGAL::successor (lCurr) ) ;
ForwardPointIterator lPrev = ( lCurr == aBegin ? lLast : CGAL::cpp0x::prev (lCurr) ) ;
ForwardPointIterator lNext = ( lCurr == lLast ? aBegin : CGAL::cpp0x::next (lCurr) ) ;
if ( !equal(*lPrev,*lCurr) && !equal(*lCurr,*lNext) && !collinear(*lPrev,*lCurr,*lNext) )
{

View File

@ -577,12 +577,12 @@ bool EdgeCollapse<M,SP,VIM,EIM,EBM,CF,PF,V>::Is_collapse_geometrically_valid( Pr
typedef typename Profile::vertex_descriptor_vector::const_iterator const_link_iterator ;
const_link_iterator linkb = aProfile.link().begin();
const_link_iterator linke = aProfile.link().end ();
const_link_iterator linkl = predecessor(linke) ;
const_link_iterator linkl = cpp0x::prev(linke) ;
for ( const_link_iterator l = linkb ; l != linke && rR ; ++ l )
{
const_link_iterator pv = ( l == linkb ? linkl : predecessor(l) );
const_link_iterator nx = ( l == linkl ? linkb : successor (l) ) ;
const_link_iterator pv = ( l == linkb ? linkl : cpp0x::prev (l) );
const_link_iterator nx = ( l == linkl ? linkb : cpp0x::next (l) ) ;
// k0,k1 and k3 are three consecutive vertices along the link.
vertex_descriptor k1 = *pv ;