diff --git a/Arrangement_of_spheres_3/include/CGAL/Arrangement_of_spheres_3/Sphere_line_intersection.h b/Arrangement_of_spheres_3/include/CGAL/Arrangement_of_spheres_3/Sphere_line_intersection.h index 6ee2a579fe2..7542b331e9d 100644 --- a/Arrangement_of_spheres_3/include/CGAL/Arrangement_of_spheres_3/Sphere_line_intersection.h +++ b/Arrangement_of_spheres_3/include/CGAL/Arrangement_of_spheres_3/Sphere_line_intersection.h @@ -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; diff --git a/Arrangement_of_spheres_3/include/CGAL/Arrangement_of_spheres_traits_3.h b/Arrangement_of_spheres_3/include/CGAL/Arrangement_of_spheres_traits_3.h index 433001438bf..64ce0237c4b 100644 --- a/Arrangement_of_spheres_3/include/CGAL/Arrangement_of_spheres_traits_3.h +++ b/Arrangement_of_spheres_3/include/CGAL/Arrangement_of_spheres_traits_3.h @@ -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); } diff --git a/Cartesian_kernel/include/CGAL/predicates/kernel_ftC2.h b/Cartesian_kernel/include/CGAL/predicates/kernel_ftC2.h index 33a1f1c2eab..11ea63b1467 100644 --- a/Cartesian_kernel/include/CGAL/predicates/kernel_ftC2.h +++ b/Cartesian_kernel/include/CGAL/predicates/kernel_ftC2.h @@ -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); diff --git a/Envelope_3/include/CGAL/Env_plane_traits_3.h b/Envelope_3/include/CGAL/Env_plane_traits_3.h index e82875b0084..d7a94be2b0e 100644 --- a/Envelope_3/include/CGAL/Env_plane_traits_3.h +++ b/Envelope_3/include/CGAL/Env_plane_traits_3.h @@ -280,7 +280,7 @@ class Env_plane_traits_3 : public Arr_linear_traits_2 y2 = p2.y(); Sign s2 = CGAL_NTS sign(-b3*x1+a3*y1-(-b3*x2+a3*y2)); - return (Comparison_result(s1 * s2)); + return s1 * s2; } }; diff --git a/Envelope_3/include/CGAL/Env_sphere_traits_3.h b/Envelope_3/include/CGAL/Env_sphere_traits_3.h index 7f3fa235909..3adcc5c06c6 100644 --- a/Envelope_3/include/CGAL/Env_sphere_traits_3.h +++ b/Envelope_3/include/CGAL/Env_sphere_traits_3.h @@ -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) diff --git a/Envelope_3/include/CGAL/Env_triangle_traits_3.h b/Envelope_3/include/CGAL/Env_triangle_traits_3.h index 1f635cd3972..842ad525044 100644 --- a/Envelope_3/include/CGAL/Env_triangle_traits_3.h +++ b/Envelope_3/include/CGAL/Env_triangle_traits_3.h @@ -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; } }; diff --git a/Kinetic_data_structures/include/CGAL/Kinetic/Triangulation_2.h b/Kinetic_data_structures/include/CGAL/Kinetic/Triangulation_2.h index e6f1688c26a..1260622e28b 100644 --- a/Kinetic_data_structures/include/CGAL/Kinetic/Triangulation_2.h +++ b/Kinetic_data_structures/include/CGAL/Kinetic/Triangulation_2.h @@ -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)); diff --git a/Triangulation_3/include/CGAL/predicates/predicates_on_weighted_points_cartesian_3.h b/Triangulation_3/include/CGAL/predicates/predicates_on_weighted_points_cartesian_3.h index ce02b2056f6..f4e9602112c 100644 --- a/Triangulation_3/include/CGAL/predicates/predicates_on_weighted_points_cartesian_3.h +++ b/Triangulation_3/include/CGAL/predicates/predicates_on_weighted_points_cartesian_3.h @@ -24,9 +24,7 @@ #include #include -//------------------------------------------------------------------- CGAL_BEGIN_NAMESPACE -//------------------------------------------------------------------- template < class FT > Comparison_result @@ -35,15 +33,14 @@ compare_power_distanceC3( const FT &qx, const FT &qy, const FT &qz, const FT &qw, const FT &rx, const FT &ry, const FT &rz, const FT &rw) { - FT dqx = qx - px; - FT dqy = qy - py; - FT dqz = qz - pz; - 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 ) )); + FT dqx = qx - px; + FT dqy = qy - py; + FT dqz = qz - pz; + FT drx = rx - px; + FT dry = ry - py; + FT drz = rz - pz; + return CGAL_NTS compare(dqx*dqx + dqy*dqy + dqz*dqz - qw, + drx*drx + dry*dry + drz*drz - rw); }