From daca1eabbfc4cb46a68eb5e20e40bbbd05be7e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 9 May 2012 17:09:55 +0000 Subject: [PATCH] use qrt to return source and target as const ref --- Kernel_23/include/CGAL/Segment_3.h | 37 ++++++++++-------------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/Kernel_23/include/CGAL/Segment_3.h b/Kernel_23/include/CGAL/Segment_3.h index 2d8fa6008be..741526c8012 100644 --- a/Kernel_23/include/CGAL/Segment_3.h +++ b/Kernel_23/include/CGAL/Segment_3.h @@ -74,54 +74,44 @@ public: Segment_3(const Point_3& sp, const Point_3& ep) : Rep(typename R::Construct_segment_3()(Return_base_tag(), sp, ep)) {} -// FIXME TODO : Use Qrt here ! - //typename Qualified_result_of::type - Point_3 + typename Qualified_result_of::type source() const { return R_().construct_source_3_object()(*this); } - //typename Qualified_result_of::type - Point_3 + typename Qualified_result_of::type target() const { return R_().construct_target_3_object()(*this); } - //typename Qualified_result_of::type - Point_3 + typename Qualified_result_of::type start() const { return source(); } - //typename Qualified_result_of::type - Point_3 + typename Qualified_result_of::type end() const { return target(); } - //typename Qualified_result_of::type - Point_3 + typename Qualified_result_of::type min BOOST_PREVENT_MACRO_SUBSTITUTION () const; - //typename Qualified_result_of::type - Point_3 + typename Qualified_result_of::type max BOOST_PREVENT_MACRO_SUBSTITUTION () const; - //typename Qualified_result_of::type - Point_3 + typename Qualified_result_of::type vertex(int i) const; - //typename Qualified_result_of::type - Point_3 + typename Qualified_result_of::type point(int i) const { return vertex(i); } - //typename Qualified_result_of::type - Point_3 + typename Qualified_result_of::type operator[](int i) const { return vertex(i); } @@ -179,8 +169,7 @@ public: template < class R_ > CGAL_KERNEL_INLINE -//typename Qualified_result_of >::type -typename R_::Point_3 +typename Qualified_result_of >::type Segment_3::min BOOST_PREVENT_MACRO_SUBSTITUTION () const { typename R_::Less_xyz_3 less_xyz; @@ -189,8 +178,7 @@ Segment_3::min BOOST_PREVENT_MACRO_SUBSTITUTION () const template < class R_ > CGAL_KERNEL_INLINE -//typename Qualified_result_of >::type -typename R_::Point_3 +typename Qualified_result_of >::type Segment_3::max BOOST_PREVENT_MACRO_SUBSTITUTION () const { typename R_::Less_xyz_3 less_xyz; @@ -199,8 +187,7 @@ Segment_3::max BOOST_PREVENT_MACRO_SUBSTITUTION () const template < class R_ > CGAL_KERNEL_INLINE -//typename Qualified_result_of, int >::type -typename R_::Point_3 +typename Qualified_result_of >::type Segment_3::vertex(int i) const { return (i%2 == 0) ? source() : target();