From 4dfd622a64f71c81000b6f20134a04e2e91d84dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 16 Feb 2023 15:05:10 +0100 Subject: [PATCH] typename K::Obj rather than Obj since we don't control the traits in theory --- .../examples/Straight_skeleton_2/print.h | 2 +- .../constructions/Polygon_offset_cons_ftC2.h | 19 ++++++------ .../Straight_skeleton_cons_ftC2.h | 29 ++++++++++--------- .../predicates/Straight_skeleton_pred_ftC2.h | 18 +++++------- .../test/Straight_skeleton_2/print.h | 2 +- 5 files changed, 35 insertions(+), 35 deletions(-) diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/print.h b/Straight_skeleton_2/examples/Straight_skeleton_2/print.h index 4afc5e4a3bd..78d636641f6 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/print.h +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/print.h @@ -2,7 +2,7 @@ #include template -void print_point ( CGAL::Point_2 const& p ) +void print_point ( typename K::Point_2 const& p ) { std::cout << "(" << p.x() << "," << p.y() << ")" ; } diff --git a/Straight_skeleton_2/include/CGAL/constructions/Polygon_offset_cons_ftC2.h b/Straight_skeleton_2/include/CGAL/constructions/Polygon_offset_cons_ftC2.h index 471e23c07d9..964141b3d1e 100644 --- a/Straight_skeleton_2/include/CGAL/constructions/Polygon_offset_cons_ftC2.h +++ b/Straight_skeleton_2/include/CGAL/constructions/Polygon_offset_cons_ftC2.h @@ -32,18 +32,19 @@ namespace CGAL_SS_i { // POSTCONDITION: In case of overflow an empty optional is returned. // template -boost::optional< Point_2 > construct_offset_pointC2 ( typename K::FT const& t, - Segment_2_with_ID const& e0, - typename K::FT const& weight0, - Segment_2_with_ID const& e1, - typename K::FT const& weight1, - boost::intrusive_ptr< Trisegment_2 > > const& tri, - CoeffCache& aCoeff_cache) +boost::optional< typename K::Point_2 > +construct_offset_pointC2 ( typename K::FT const& t, + Segment_2_with_ID const& e0, + typename K::FT const& weight0, + Segment_2_with_ID const& e1, + typename K::FT const& weight1, + boost::intrusive_ptr< Trisegment_2 > > const& tri, + CoeffCache& aCoeff_cache) { typedef typename K::FT FT ; - typedef Point_2 Point_2 ; - typedef Line_2 Line_2 ; + typedef typename K::Point_2 Point_2 ; + typedef typename K::Line_2 Line_2 ; typedef boost::optional Optional_point_2 ; typedef boost::optional Optional_line_2 ; diff --git a/Straight_skeleton_2/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h b/Straight_skeleton_2/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h index 126c9abdef4..38d0372a647 100644 --- a/Straight_skeleton_2/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h +++ b/Straight_skeleton_2/include/CGAL/constructions/Straight_skeleton_cons_ftC2.h @@ -366,8 +366,9 @@ compute_normal_offset_lines_isec_timeC2 ( boost::intrusive_ptr< Trisegment_2 -boost::optional< Point_2 > compute_oriented_midpoint ( Segment_2_with_ID const& e0, - Segment_2_with_ID const& e1 ) +boost::optional< typename K::Point_2 > +compute_oriented_midpoint ( Segment_2_with_ID const& e0, + Segment_2_with_ID const& e1 ) { bool ok = false ; @@ -426,12 +427,12 @@ boost::optional< Point_2 > compute_oriented_midpoint ( Segment_2_with_ID c // If you request the point of such degenerate pseudo seed the oriented midpoint between e0 and e2 is returned. // template -boost::optional< Point_2 > +boost::optional< typename K::Point_2 > compute_seed_pointC2 ( boost::intrusive_ptr< Trisegment_2 > > const& tri, typename Trisegment_2 >::SEED_ID sid, CoeffCache& aCoeff_cache) { - boost::optional< Point_2 > p ; + boost::optional< typename K::Point_2 > p ; typedef Trisegment_2 > Trisegment_2 ; @@ -465,7 +466,7 @@ compute_seed_pointC2 ( boost::intrusive_ptr< Trisegment_2 -boost::optional< Point_2 > +boost::optional< typename K::Point_2 > compute_degenerate_seed_pointC2 ( boost::intrusive_ptr< Trisegment_2 > > const& tri, CoeffCache& aCoeff_cache ) { @@ -489,8 +490,8 @@ compute_degenerate_offset_lines_isec_timeC2 ( boost::intrusive_ptr< Trisegment_2 { typedef typename K::FT FT ; - typedef Point_2 Point_2 ; - typedef Line_2 Line_2 ; + typedef typename K::Point_2 Point_2 ; + typedef typename K::Line_2 Line_2 ; typedef boost::optional Optional_point_2 ; typedef boost::optional Optional_line_2 ; @@ -667,17 +668,17 @@ compute_offset_lines_isec_timeC2 ( boost::intrusive_ptr< Trisegment_2 -boost::optional< Point_2 > +boost::optional< typename K::Point_2 > construct_normal_offset_lines_isecC2 ( boost::intrusive_ptr< Trisegment_2 > > const& tri, CoeffCache& aCoeff_cache) { typedef typename K::FT FT ; - typedef Line_2 Line_2 ; + typedef typename K::Line_2 Line_2 ; typedef boost::optional Optional_line_2 ; - CGAL_STSKEL_TRAITS_TRACE("Computing normal offset lines isec point for: " << tri ) ; + CGAL_STSKEL_TRAITS_TRACE("Computing normal offset lines isec point for:" << tri ) ; FT x(0), y(0) ; @@ -728,14 +729,14 @@ construct_normal_offset_lines_isecC2 ( boost::intrusive_ptr< Trisegment_2 -boost::optional< Point_2 > +boost::optional< typename K::Point_2 > construct_degenerate_offset_lines_isecC2 ( boost::intrusive_ptr< Trisegment_2 > > const& tri, CoeffCache& aCoeff_cache) { typedef typename K::FT FT ; - typedef Point_2 Point_2 ; - typedef Line_2 Line_2 ; + typedef typename K::Point_2 Point_2 ; + typedef typename K::Line_2 Line_2 ; typedef boost::optional Optional_point_2 ; typedef boost::optional Optional_line_2 ; @@ -841,7 +842,7 @@ construct_degenerate_offset_lines_isecC2 ( boost::intrusive_ptr< Trisegment_2 -boost::optional< Point_2 > +boost::optional< typename K::Point_2 > construct_offset_lines_isecC2 ( boost::intrusive_ptr< Trisegment_2 > > const& tri, CoeffCache& aCoeff_cache) { diff --git a/Straight_skeleton_2/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h b/Straight_skeleton_2/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h index 14077a3aaa4..3fa43345069 100644 --- a/Straight_skeleton_2/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h +++ b/Straight_skeleton_2/include/CGAL/predicates/Straight_skeleton_pred_ftC2.h @@ -37,10 +37,9 @@ namespace CGAL_SS_i { // the three points are along the same line, in any order. template inline -Uncertain certified_collinearC2( Point_2 const& p - , Point_2 const& q - , Point_2 const& r - ) +Uncertain certified_collinearC2( typename K::Point_2 const& p, + typename K::Point_2 const& q, + typename K::Point_2 const& r ) { return CGAL_NTS certified_is_equal( ( q.x() - p.x() ) * ( r.y() - p.y() ) , ( r.x() - p.x() ) * ( q.y() - p.y() ) @@ -52,10 +51,9 @@ Uncertain certified_collinearC2( Point_2 const& p // q is in the closed segment [p,r]. template inline -Uncertain certified_collinear_are_ordered_along_lineC2( Point_2 const& p - , Point_2 const& q - , Point_2 const& r - ) +Uncertain certified_collinear_are_ordered_along_lineC2( typename K::Point_2 const& p, + typename K::Point_2 const& q, + typename K::Point_2 const& r ) { if ( CGAL_NTS certainly(p.x() < q.x()) ) return !(r.x() < q.x()); if ( CGAL_NTS certainly(q.x() < p.x()) ) return !(q.x() < r.x()); @@ -305,7 +303,7 @@ Uncertain compare_isec_anglesC2 ( Vector_2 const& aBV1 // Returns true if the point aP is on the positive side of the line supporting the edge // template -Uncertain is_edge_facing_pointC2 ( boost::optional< Point_2 > const& aP, +Uncertain is_edge_facing_pointC2 ( boost::optional< typename K::Point_2 > const& aP, Segment_2_with_ID const& aEdge ) { typedef typename K::FT FT ; @@ -528,7 +526,7 @@ Uncertain are_events_simultaneousC2 ( boost::intrusive_ptr< Trisegment_2 Point_2 ; + typedef typename K::Point_2 Point_2 ; typedef Rational Rational ; typedef Quotient Quotient ; diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/print.h b/Straight_skeleton_2/test/Straight_skeleton_2/print.h index abaa74d9e46..682da0bfa76 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/print.h +++ b/Straight_skeleton_2/test/Straight_skeleton_2/print.h @@ -4,7 +4,7 @@ #include template -void print_point ( CGAL::Point_2 const& p ) +void print_point ( typename K::Point_2 const& p ) { std::cout << p.x() << " " << p.y(); }