Use 'FT' as template parameter rather than 'Traits'

This commit is contained in:
Mael Rouxel-Labbé 2023-02-14 10:04:03 +01:00
parent 07ce38a0f6
commit 38312c1e63
2 changed files with 8 additions and 10 deletions

View File

@ -19,7 +19,7 @@
namespace CGAL { namespace CGAL {
template < class Refs, class Traits > template < class Refs, class FT >
class Straight_skeleton_halfedge_base_base_2 class Straight_skeleton_halfedge_base_base_2
{ {
public: public:
@ -38,9 +38,7 @@ public:
typedef typename Refs::Vertex Vertex; typedef typename Refs::Vertex Vertex;
typedef typename Refs::Face Face; typedef typename Refs::Face Face;
typedef typename Traits::FT FT; typedef Straight_skeleton_halfedge_base_base_2<Refs, FT> Base_base ;
typedef Straight_skeleton_halfedge_base_base_2<Refs, Traits> Base_base ;
protected: protected:
@ -95,7 +93,6 @@ public:
Halfedge_const_handle defining_contour_edge() const { return this->face()->halfedge() ; } Halfedge_const_handle defining_contour_edge() const { return this->face()->halfedge() ; }
Halfedge_handle defining_contour_edge() { return this->face()->halfedge() ; } Halfedge_handle defining_contour_edge() { return this->face()->halfedge() ; }
// @fixme below is not documented in the `StraightSkeletonHalfedge_2` concept
Sign slope() const { return mSlope ; } Sign slope() const { return mSlope ; }
void set_slope( Sign aSlope ) { mSlope = aSlope ; } void set_slope( Sign aSlope ) { mSlope = aSlope ; }
@ -114,8 +111,8 @@ private:
FT mWeight ; FT mWeight ;
}; };
template < class Refs, class Traits > template < class Refs, class FT >
class Straight_skeleton_halfedge_base_2 : public Straight_skeleton_halfedge_base_base_2<Refs, Traits> class Straight_skeleton_halfedge_base_2 : public Straight_skeleton_halfedge_base_base_2<Refs, FT>
{ {
public: public:
@ -123,8 +120,8 @@ public:
typedef typename Refs::Halfedge_handle Halfedge_handle; typedef typename Refs::Halfedge_handle Halfedge_handle;
typedef typename Refs::Face_handle Face_handle; typedef typename Refs::Face_handle Face_handle;
typedef Straight_skeleton_halfedge_base_base_2<Refs, Traits> Base_base ; typedef Straight_skeleton_halfedge_base_base_2<Refs, FT> Base_base ;
typedef Straight_skeleton_halfedge_base_2<Refs, Traits> Base ; typedef Straight_skeleton_halfedge_base_2<Refs, FT> Base ;
Straight_skeleton_halfedge_base_2() {} Straight_skeleton_halfedge_base_2() {}

View File

@ -35,7 +35,8 @@ public:
template<class Refs, class Traits> template<class Refs, class Traits>
struct Halfedge_wrapper struct Halfedge_wrapper
{ {
typedef Straight_skeleton_halfedge_base_2 < Refs, Traits > Halfedge; typedef typename Traits::FT FT ;
typedef Straight_skeleton_halfedge_base_2 < Refs, FT > Halfedge;
}; };
template<class Refs, class Traits> template<class Refs, class Traits>