From 659d2d12f23b0ccfb1c04ed9dcc112b6509c3a35 Mon Sep 17 00:00:00 2001 From: Luigi Malomo Date: Fri, 16 Oct 2020 14:15:40 +0200 Subject: [PATCH] removed deprecated std::unary_function --- vcg/complex/algorithms/cylinder_clipping.h | 2 +- vcg/complex/algorithms/quadrangulator.h | 2 +- vcg/complex/algorithms/refine.h | 16 ++++++++-------- vcg/complex/algorithms/refine_loop.h | 4 ++-- vcg/space/deprecated_point.h | 1 + 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/vcg/complex/algorithms/cylinder_clipping.h b/vcg/complex/algorithms/cylinder_clipping.h index 7e2849fc..14c7e9ad 100644 --- a/vcg/complex/algorithms/cylinder_clipping.h +++ b/vcg/complex/algorithms/cylinder_clipping.h @@ -276,7 +276,7 @@ public: } }; - class CylMidPoint : public std::unary_function + class CylMidPoint { private: CylMidPoint() {assert(0);} diff --git a/vcg/complex/algorithms/quadrangulator.h b/vcg/complex/algorithms/quadrangulator.h index 3cc08097..70e44769 100644 --- a/vcg/complex/algorithms/quadrangulator.h +++ b/vcg/complex/algorithms/quadrangulator.h @@ -318,7 +318,7 @@ private: // In this implemenation we simply put the new vertex in the MidPoint position. // Color and TexCoords are interpolated accordingly. template - struct SplitMidPoint : public std::unary_function , typename MESH_TYPE::CoordType > + struct SplitMidPoint { typedef typename MESH_TYPE::VertexType VertexType; typedef typename MESH_TYPE::FaceType FaceType; diff --git a/vcg/complex/algorithms/refine.h b/vcg/complex/algorithms/refine.h index 65212987..cd3c75a6 100644 --- a/vcg/complex/algorithms/refine.h +++ b/vcg/complex/algorithms/refine.h @@ -122,7 +122,7 @@ struct BaseInterpolator // providing, in the constructor, an interpolator functor that will be called for each new vertex to be created. template > -struct MidPoint : public std::unary_function , typename MESH_TYPE::CoordType > +struct MidPoint { typedef typename face::Pos PosType; typedef typename MESH_TYPE::VertexType VertexType; @@ -179,7 +179,7 @@ struct MidPoint : public std::unary_function -struct MidPointArc : public std::unary_function , typename MESH_TYPE::CoordType> +struct MidPointArc { void operator()(typename MESH_TYPE::VertexType &nv, face::Pos ep) { @@ -251,7 +251,7 @@ A non linear subdivision scheme for triangle meshes */ template -struct MidPointArcNaive : public std::unary_function< face::Pos , typename MESH_TYPE::CoordType> +struct MidPointArcNaive { typename MESH_TYPE::CoordType operator()(face::Pos ep) { @@ -575,7 +575,7 @@ Siggraph 2000 Course Notes */ template -struct MidPointButterfly : public std::unary_function , typename MESH_TYPE::CoordType> +struct MidPointButterfly { MESH_TYPE &m; MidPointButterfly(MESH_TYPE &_m):m(_m){} @@ -689,7 +689,7 @@ struct MidPointButterfly : public std::unary_function -struct MidPointButterfly2 : public std::unary_function , typename MESH_TYPE::CoordType> +struct MidPointButterfly2 { typename MESH_TYPE::CoordType operator()(face::Pos ep) { @@ -780,7 +780,7 @@ face::Pos he(ep.f,ep.z,ep.f->V(ep.z)); */ template -class QualityMidPointFunctor : public std::unary_function , typename MESH_TYPE::CoordType> +class QualityMidPointFunctor { public: typedef Point3 Point3x; @@ -843,7 +843,7 @@ class QualityEdgePredicate template -struct MidPointSphere : public std::unary_function , typename MESH_TYPE::CoordType> +struct MidPointSphere { Sphere3 sph; typedef Point3 Point3x; @@ -889,7 +889,7 @@ class EdgeSplSphere }; template -struct CenterPointBarycenter : public std::unary_function +struct CenterPointBarycenter { typename TRIMESH_TYPE::CoordType operator()(typename TRIMESH_TYPE::FacePointer f){ return vcg::Barycenter(*f); diff --git a/vcg/complex/algorithms/refine_loop.h b/vcg/complex/algorithms/refine_loop.h index eab257b4..bd631bfb 100644 --- a/vcg/complex/algorithms/refine_loop.h +++ b/vcg/complex/algorithms/refine_loop.h @@ -340,7 +340,7 @@ struct LS3Projection { }; template, class WEIGHT_TYPE=LoopWeight > -struct OddPointLoopGeneric : public std::unary_function , typename MESH_TYPE::VertexType> +struct OddPointLoopGeneric { typedef METHOD_TYPE Projection; typedef WEIGHT_TYPE Weight; @@ -427,7 +427,7 @@ struct OddPointLoopGeneric : public std::unary_function, class WEIGHT_TYPE=LoopWeight > -struct EvenPointLoopGeneric : public std::unary_function , typename MESH_TYPE::VertexType> +struct EvenPointLoopGeneric { typedef METHOD_TYPE Projection; typedef WEIGHT_TYPE Weight; diff --git a/vcg/space/deprecated_point.h b/vcg/space/deprecated_point.h index f5cf4585..c973fa81 100644 --- a/vcg/space/deprecated_point.h +++ b/vcg/space/deprecated_point.h @@ -733,6 +733,7 @@ public: return Point4( _v[0]*s, _v[1]*s , _v[2]*s , _v[3]*s ); } inline PointType operator ^ ( PointType const & p ) const { + (void)p; assert(0); return *this; }