mirror of https://github.com/CGAL/cgal
Remove more useless enum_cast<>.
This commit is contained in:
parent
54648829af
commit
1d47b96e3c
|
|
@ -194,7 +194,7 @@ public:
|
|||
*/
|
||||
Oriented_side oriented_side(const Point_3 & p) const
|
||||
{
|
||||
return enum_cast<Oriented_side>(CGAL_NTS sign(m_a*p.x() + m_b*p.y() + m_c*p.z()));
|
||||
return CGAL_NTS sign(m_a*p.x() + m_b*p.y() + m_c*p.z());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ namespace CircularFunctors {
|
|||
const Root_of_2 a01 = qy-py;
|
||||
const Root_of_2 a10 = rx-px;
|
||||
const Root_of_2 a11 = ry-py;
|
||||
return enum_cast<Orientation>(CGAL_NTS compare(a00*a11, a10*a01));
|
||||
return CGAL_NTS compare(a00*a11, a10*a01);
|
||||
}
|
||||
|
||||
// template < class CK >
|
||||
|
|
|
|||
|
|
@ -51,9 +51,9 @@ public:
|
|||
(less_x(s.source(), p) && less_x(s.target(), p)) ) );
|
||||
|
||||
if( less_x( s.source(), s.target() ) )
|
||||
return enum_cast<Comparison_result>(orientation(p, s.source(), s.target() ));
|
||||
return orientation(p, s.source(), s.target());
|
||||
else if ( less_x( s.target(), s.source() ) )
|
||||
return enum_cast<Comparison_result>(orientation(p, s.target(), s.source() ));
|
||||
return orientation(p, s.target(), s.source());
|
||||
else {
|
||||
if( less_y(p, s.source()) && less_y(p, s.target()) )
|
||||
return SMALLER;
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ compare_21_11(const FT& A2, const FT& B2, const FT& C2,
|
|||
|
||||
FT p2 = B1 * (A1*B2 - A2*B1) - C2 * CGAL_NTS square(A1);
|
||||
|
||||
return enum_cast<Comparison_result>(CGAL_NTS sign(p2));
|
||||
return CGAL_NTS sign(p2);
|
||||
}
|
||||
|
||||
/*2 2*/template <class FT>
|
||||
|
|
@ -97,7 +97,7 @@ compare_22_21( const FT& A1p, const FT& B1p, const FT& C1p,
|
|||
|
||||
FT P4 = calcP4(J,Jp,A1,C1,A2,C2);
|
||||
|
||||
return enum_cast<Comparison_result>(- CGAL_NTS sign(P4));
|
||||
return - CGAL_NTS sign(P4);
|
||||
// if ( P4< FT(0) ) return LARGER; // r1 > l2
|
||||
// if ( P4> FT(0) ) return SMALLER; // r1 < l2
|
||||
// return EQUAL;
|
||||
|
|
@ -111,7 +111,7 @@ compare_22_12( const FT& A1, const FT& B1, const FT& C1,
|
|||
// _22_12 boils down to _22_21 by :
|
||||
// - swapping the two polynomials
|
||||
// - changing the sign of the result
|
||||
return opposite(compare_22_21(A2, B2, C2, A1, B1, C1));
|
||||
return - compare_22_21(A2, B2, C2, A1, B1, C1);
|
||||
}
|
||||
|
||||
/*2 2*/template <class FT>
|
||||
|
|
@ -155,7 +155,7 @@ compare_22_11( const FT& A1p, const FT& B1p, const FT& C1p,
|
|||
|
||||
FT P4 = calcP4(I1,I2,K);
|
||||
|
||||
return enum_cast<Comparison_result>(CGAL_NTS sign(P4));
|
||||
return CGAL_NTS sign(P4);
|
||||
}
|
||||
|
||||
// J <= 0
|
||||
|
|
@ -173,7 +173,7 @@ compare_22_11( const FT& A1p, const FT& B1p, const FT& C1p,
|
|||
|
||||
FT P4 = calcP4(I1,I2,K);
|
||||
|
||||
return enum_cast<Comparison_result>(- CGAL_NTS sign(P4));
|
||||
return - CGAL_NTS sign(P4);
|
||||
}
|
||||
|
||||
/*2 2*/template <class FT> inline
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ inline Uncertain<Sign> certified_sign_of_determinant2x2( const NT& a00
|
|||
, const NT& a11
|
||||
)
|
||||
{
|
||||
return enum_cast<Sign>(certified_compare(a00*a11, a10*a01)) ;
|
||||
return certified_compare(a00*a11, a10*a01) ;
|
||||
}
|
||||
|
||||
CGAL_END_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -400,7 +400,7 @@ oriented_side_of_event_point_wrt_bisectorC2 ( intrusive_ptr< Trisegment_2<K> > c
|
|||
, a, b, c
|
||||
);
|
||||
|
||||
rResult = enum_cast<Oriented_side>(certified_side_of_oriented_lineC2(a,b,c,p.x(),p.y()));
|
||||
rResult = certified_side_of_oriented_lineC2(a,b,c,p.x(),p.y());
|
||||
|
||||
CGAL_STSKEL_TRAITS_TRACE("Point is at " << rResult << " side of degenerate bisector through v01 " << p2str(v01)) ;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,9 +59,9 @@ power_testC2( const FT &px, const FT &py, const FT &pwt,
|
|||
FT dry = ry - ty;
|
||||
FT drz = CGAL_NTS square(drx) + CGAL_NTS square(dry) - rwt + twt;
|
||||
|
||||
return enum_cast<Oriented_side>(sign_of_determinant3x3(dpx, dpy, dpz,
|
||||
dqx, dqy, dqz,
|
||||
drx, dry, drz));
|
||||
return sign_of_determinant3x3(dpx, dpy, dpz,
|
||||
dqx, dqy, dqz,
|
||||
drx, dry, drz);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -82,11 +82,11 @@ power_testC2( const FT &px, const FT &py, const FT &pwt,
|
|||
// We do an orthogonal projection on the (x) axis, if possible.
|
||||
Comparison_result cmpx = CGAL_NTS compare(px, qx);
|
||||
if (cmpx != EQUAL)
|
||||
return Oriented_side(cmpx * sign_of_determinant2x2(dpx, dpz, dqx, dqz));
|
||||
return cmpx * sign_of_determinant2x2(dpx, dpz, dqx, dqz);
|
||||
|
||||
// If not possible, then on the (y) axis.
|
||||
Comparison_result cmpy = CGAL_NTS compare(py, qy);
|
||||
return Oriented_side(cmpy * sign_of_determinant2x2(dpy, dpz, dqy, dqz));
|
||||
return cmpy * sign_of_determinant2x2(dpy, dpz, dqy, dqz);
|
||||
}
|
||||
|
||||
CGAL_END_NAMESPACE
|
||||
|
|
|
|||
Loading…
Reference in New Issue