mirror of https://github.com/CGAL/cgal
moved point/vertex/[] definitions of Segment_2/3 inside the class
This commit is contained in:
parent
c970c4a758
commit
3f4c1c4628
|
|
@ -101,13 +101,16 @@ public:
|
||||||
max BOOST_PREVENT_MACRO_SUBSTITUTION () const;
|
max BOOST_PREVENT_MACRO_SUBSTITUTION () const;
|
||||||
|
|
||||||
decltype(auto)
|
decltype(auto)
|
||||||
vertex(int i) const;
|
vertex(int i) const
|
||||||
|
{ return (i%2 == 0) ? source() : target(); }
|
||||||
|
|
||||||
decltype(auto)
|
decltype(auto)
|
||||||
point(int i) const;
|
point(int i) const
|
||||||
|
{ return vertex(i); }
|
||||||
|
|
||||||
decltype(auto)
|
decltype(auto)
|
||||||
operator[](int i) const;
|
operator[](int i) const
|
||||||
|
{ return vertex(i); }
|
||||||
|
|
||||||
bool is_horizontal() const;
|
bool is_horizontal() const;
|
||||||
bool is_vertical() const;
|
bool is_vertical() const;
|
||||||
|
|
@ -187,29 +190,6 @@ Segment_2<R_>::max BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
||||||
return less_xy(source(),target()) ? target() : source();
|
return less_xy(source(),target()) ? target() : source();
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class R_ >
|
|
||||||
CGAL_KERNEL_INLINE
|
|
||||||
decltype(auto)
|
|
||||||
Segment_2<R_>::vertex(int i) const
|
|
||||||
{
|
|
||||||
return (i%2 == 0) ? source() : target();
|
|
||||||
}
|
|
||||||
|
|
||||||
template < class R_ >
|
|
||||||
inline
|
|
||||||
decltype(auto)
|
|
||||||
Segment_2<R_>::point(int i) const
|
|
||||||
{
|
|
||||||
return vertex(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
template < class R_ >
|
|
||||||
inline
|
|
||||||
decltype(auto)
|
|
||||||
Segment_2<R_>::operator[](int i) const
|
|
||||||
{
|
|
||||||
return vertex(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
template < class R_ >
|
template < class R_ >
|
||||||
CGAL_KERNEL_INLINE
|
CGAL_KERNEL_INLINE
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,8 @@ public:
|
||||||
max BOOST_PREVENT_MACRO_SUBSTITUTION () const;
|
max BOOST_PREVENT_MACRO_SUBSTITUTION () const;
|
||||||
|
|
||||||
decltype(auto)
|
decltype(auto)
|
||||||
vertex(int i) const;
|
vertex(int i) const
|
||||||
|
{ return (i%2 == 0) ? source() : target(); }
|
||||||
|
|
||||||
decltype(auto)
|
decltype(auto)
|
||||||
point(int i) const
|
point(int i) const
|
||||||
|
|
@ -179,14 +180,6 @@ Segment_3<R_>::max BOOST_PREVENT_MACRO_SUBSTITUTION () const
|
||||||
return less_xyz(source(),target()) ? target() : source();
|
return less_xyz(source(),target()) ? target() : source();
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class R_ >
|
|
||||||
CGAL_KERNEL_INLINE
|
|
||||||
decltype(auto)
|
|
||||||
Segment_3<R_>::vertex(int i) const
|
|
||||||
{
|
|
||||||
return (i%2 == 0) ? source() : target();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template < class R >
|
template < class R >
|
||||||
std::ostream &
|
std::ostream &
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue