mirror of https://github.com/CGAL/cgal
Remove casts to Comparison_result.
They are useless since we merged the various enum types.
This commit is contained in:
parent
b0f2c77fdc
commit
643ea487a0
|
|
@ -257,7 +257,7 @@ public:
|
|||
CGAL::Comparison_result c= compare(pt,Coordinate_index(i));
|
||||
if (c != CGAL::EQUAL) {
|
||||
if (line().to_vector()[i] >0) return c;
|
||||
else return CGAL::Comparison_result(-c);
|
||||
else return -c;
|
||||
}
|
||||
}
|
||||
return CGAL::EQUAL;
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ struct Arrangement_of_spheres_traits_3 {
|
|||
sphere0,
|
||||
pt,
|
||||
return CGAL::EQUAL,
|
||||
return Comparison_result(-cr),
|
||||
return -cr,
|
||||
return cr,
|
||||
return cr,
|
||||
return cr);
|
||||
|
|
@ -295,7 +295,7 @@ struct Arrangement_of_spheres_traits_3 {
|
|||
sphere,
|
||||
pt,
|
||||
return CGAL::EQUAL,
|
||||
return Comparison_result(-crrs),
|
||||
return -crrs,
|
||||
return crrs,
|
||||
return crrs,
|
||||
return crrs);
|
||||
|
|
@ -391,7 +391,7 @@ struct Arrangement_of_spheres_traits_3 {
|
|||
if (compare_c(sp, p.x(),CGAL_AOS3_INTERNAL_NS::sweep_coordinate()) == EQUAL) return EQUAL;
|
||||
if (p.x()>0 && compare_c(sp, p.x(), CGAL_AOS3_INTERNAL_NS::sweep_coordinate()) == LARGER
|
||||
|| p.x()<0 && compare_c(sp, p.x(), CGAL_AOS3_INTERNAL_NS::sweep_coordinate()) == SMALLER ){
|
||||
return Comparison_result(-c0);
|
||||
return -c0;
|
||||
} else return c0;
|
||||
} else {
|
||||
return c0;
|
||||
|
|
@ -436,7 +436,7 @@ struct Arrangement_of_spheres_traits_3 {
|
|||
const Sphere_point_3& b,
|
||||
Coordinate_index C) const {
|
||||
if (C != CGAL_AOS3_INTERNAL_NS::sweep_coordinate()) {
|
||||
return Comparison_result(-compare_to_rule_c(b,a.key(),C));
|
||||
return -compare_to_rule_c(b,a.key(),C);
|
||||
} else {
|
||||
return a.coord().compare_c(b, C);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,8 +96,7 @@ compare_xC2(const FT &la, const FT &lb, const FT &lc,
|
|||
FT den2 = det2x2_by_formula( la, lb, h2a, h2b);
|
||||
Sign s = Sign (CGAL_NTS sign(den1) * CGAL_NTS sign(den2));
|
||||
CGAL_kernel_assertion( s != ZERO );
|
||||
return Comparison_result( s * sign_of_determinant(num1,
|
||||
num2, den1, den2));
|
||||
return s * sign_of_determinant(num1, num2, den1, den2);
|
||||
*/
|
||||
FT num1 = det2x2_by_formula( la, lc, h1a, h1c);
|
||||
FT num2 = det2x2_by_formula( la, lc, h2a, h2c);
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@ class Env_plane_traits_3 : public Arr_linear_traits_2<Kernel_>
|
|||
y2 = p2.y();
|
||||
|
||||
Sign s2 = CGAL_NTS sign(-b3*x1+a3*y1-(-b3*x2+a3*y2));
|
||||
return (Comparison_result(s1 * s2));
|
||||
return s1 * s2;
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -773,9 +773,9 @@ public:
|
|||
|
||||
Sign res = CGAL_NTS sign(z1 - z2);
|
||||
if (parent.m_is_lower)
|
||||
return Comparison_result(res);
|
||||
return res;
|
||||
else
|
||||
return Comparison_result(-res);
|
||||
return -res;
|
||||
}
|
||||
|
||||
// second method of compare in point
|
||||
|
|
@ -825,7 +825,7 @@ public:
|
|||
Algebraic(1),
|
||||
A1,
|
||||
A2);
|
||||
return Comparison_result(res);
|
||||
return res;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -1034,7 +1034,7 @@ public:
|
|||
Sign sign3 = (compare_on_right ? (CGAL_NTS sign(1)) :
|
||||
(CGAL_NTS sign(-1)));
|
||||
|
||||
return Comparison_result(sign1 * sign2 * sign3);
|
||||
return sign1 * sign2 * sign3;
|
||||
|
||||
}
|
||||
else if (C1 != 0 && C2 == 0)
|
||||
|
|
|
|||
|
|
@ -842,7 +842,7 @@ public:
|
|||
FT x1 = p1.x(), y1 = p1.y(), x2 = p2.x(), y2 = p2.y();
|
||||
|
||||
Sign s2 = CGAL_NTS sign(-b3*x1+a3*y1-(-b3*x2+a3*y2));
|
||||
return (Comparison_result(s1 * s2));
|
||||
return s1 * s2;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -513,7 +513,7 @@ public:
|
|||
flip(Edge(f, 1));
|
||||
} else {
|
||||
CGAL::Comparison_result cx02= traits_.compare(f->vertex(0)->point(), f->vertex(2)->point(), 0);
|
||||
if (cx02 == CGAL::Comparison_result(-cx12)) {
|
||||
if (cx02 == -cx12) {
|
||||
flip(Edge(f,2));
|
||||
} else {
|
||||
flip(Edge(f,0));
|
||||
|
|
|
|||
|
|
@ -24,9 +24,7 @@
|
|||
#include <CGAL/determinant.h>
|
||||
#include <CGAL/enum.h>
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
CGAL_BEGIN_NAMESPACE
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
template < class FT >
|
||||
Comparison_result
|
||||
|
|
@ -41,9 +39,8 @@ compare_power_distanceC3(
|
|||
FT drx = rx - px;
|
||||
FT dry = ry - py;
|
||||
FT drz = rz - pz;
|
||||
return Comparison_result((Sign) CGAL_NTS sign (
|
||||
(dqx*dqx + dqy*dqy + dqz*dqz - qw )
|
||||
- (drx*drx + dry*dry + drz*drz - rw ) ));
|
||||
return CGAL_NTS compare(dqx*dqx + dqy*dqy + dqz*dqz - qw,
|
||||
drx*drx + dry*dry + drz*drz - rw);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue