From 9424d0e9d89b878302e405c546f2a524d2ce69f2 Mon Sep 17 00:00:00 2001 From: Sylvain Pion Date: Thu, 3 Aug 2006 11:29:12 +0000 Subject: [PATCH] Remove some assertions, as they must not pop-up, since they are used by Cartesian_converter/Homogeneous_converter, where we absolutely must not throw. TODO : find a way to keep the assertion while having the converters still work. (should types come with their own conversions, like they all have .bbox() ?) --- Cartesian_kernel/include/CGAL/Cartesian/Iso_cuboid_3.h | 7 ++++--- Cartesian_kernel/include/CGAL/Cartesian/Iso_rectangle_2.h | 3 ++- Cartesian_kernel/include/CGAL/Cartesian/function_objects.h | 5 +++-- .../include/CGAL/Homogeneous/Iso_rectangleH2.h | 5 +++-- .../include/CGAL/Homogeneous/function_objects.h | 5 +++-- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Iso_cuboid_3.h b/Cartesian_kernel/include/CGAL/Cartesian/Iso_cuboid_3.h index 7c9a7471390..b12d3b44822 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Iso_cuboid_3.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Iso_cuboid_3.h @@ -52,9 +52,10 @@ public: Iso_cuboidC3(const Point_3 &p, const Point_3 &q, int) : base(p, q) { - CGAL_kernel_assertion(p.x()<=q.x()); - CGAL_kernel_assertion(p.y()<=q.y()); - CGAL_kernel_assertion(p.z()<=q.z()); + // I have to remove the assertions, because of Cartesian_converter. + // CGAL_kernel_assertion(p.x()<=q.x()); + // CGAL_kernel_assertion(p.y()<=q.y()); + // CGAL_kernel_assertion(p.z()<=q.z()); } Iso_cuboidC3(const Point_3 &p, const Point_3 &q) diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Iso_rectangle_2.h b/Cartesian_kernel/include/CGAL/Cartesian/Iso_rectangle_2.h index 644fd696435..8788dd62706 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Iso_rectangle_2.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Iso_rectangle_2.h @@ -52,7 +52,8 @@ public: Iso_rectangleC2(const Point_2 &p, const Point_2 &q, int) : base(p, q) { - CGAL_kernel_assertion(p<=q); + // I have to remove the assertions, because of Cartesian_converter. + // CGAL_kernel_assertion(p<=q); } const Point_2 & min() const diff --git a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h index c0add72f6c1..0aa9d81df0e 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h @@ -1955,8 +1955,9 @@ namespace CartesianKernelFunctors { Iso_rectangle_2 operator()(const Point_2& p, const Point_2& q, int) const { - CGAL_kernel_assertion(p.x()<=q.x()); - CGAL_kernel_assertion(p.y()<=q.y()); + // I have to remove the assertions, because of Cartesian_converter. + // CGAL_kernel_assertion(p.x()<=q.x()); + // CGAL_kernel_assertion(p.y()<=q.y()); return Rep(p, q, 0); } diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/Iso_rectangleH2.h b/Homogeneous_kernel/include/CGAL/Homogeneous/Iso_rectangleH2.h index ddd6251ec78..744dbda92fe 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/Iso_rectangleH2.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/Iso_rectangleH2.h @@ -51,8 +51,9 @@ public: Iso_rectangleH2(const Point_2& p, const Point_2& q, int) : base(p, q) { - CGAL_kernel_assertion(p.x()<=q.x()); - CGAL_kernel_assertion(p.y()<=q.y()); + // I have to remove the assertions, because of Homogeneous_converter. + // CGAL_kernel_assertion(p.x()<=q.x()); + // CGAL_kernel_assertion(p.y()<=q.y()); } const Point_2 & min() const; diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h b/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h index 7520be0694f..d9beb60ec48 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h @@ -2523,8 +2523,9 @@ namespace HomogeneousKernelFunctors { Iso_rectangle_2 operator()(const Point_2& p, const Point_2& q, int) const { - CGAL_kernel_assertion(p.x()<=q.x()); - CGAL_kernel_assertion(p.y()<=q.y()); + // I have to remove the assertions, because of Cartesian_converter. + // CGAL_kernel_assertion(p.x()<=q.x()); + // CGAL_kernel_assertion(p.y()<=q.y()); return Rep(p, q, 0); }