diff --git a/Bounding_volumes/doc/Bounding_volumes/PackageDescription.txt b/Bounding_volumes/doc/Bounding_volumes/PackageDescription.txt index 6fa63e9c60d..7ec2b717b7b 100644 --- a/Bounding_volumes/doc/Bounding_volumes/PackageDescription.txt +++ b/Bounding_volumes/doc/Bounding_volumes/PackageDescription.txt @@ -20,12 +20,6 @@ \cgalPkgShortInfoEnd \cgalPkgDescriptionEnd -\cgalCRPSection{Assertions} - -The optimization code uses infix `OPTIMISATION` in the assertions, -e.g. defining the compiler flag -`CGAL_OPTIMISATION_NO_PRECONDITIONS` switches precondition -checking off, cf. Section \ref secchecks. \cgalClassifedRefPages @@ -62,4 +56,3 @@ checking off, cf. Section \ref secchecks. - `CGAL::Min_sphere_of_spheres_d` - `MinSphereOfSpheresTraits` */ - diff --git a/Documentation/doc/Documentation/Developer_manual/Chapter_checks.txt b/Documentation/doc/Documentation/Developer_manual/Chapter_checks.txt index 1a6fb78e4cb..209aeca5649 100644 --- a/Documentation/doc/Documentation/Developer_manual/Chapter_checks.txt +++ b/Documentation/doc/Documentation/Developer_manual/Chapter_checks.txt @@ -156,53 +156,8 @@ the computation is done with some exact number type. \section secchecks_controlling Controlling checks at a finer granularity The macros and related compile-time flags described so far all operate -on the whole library. Sometimes the user may want to have a more -selective control. \cgal offers the possibility to turn checks on -and off on a per-package basis. Therefore a package-specific term is -inserted in the macro names directly after the \cgal prefix, -e.g., `CGAL_kernel_assertion()`. Similarly, the uppercase -term is used for the compile-time flags; -e.g., `CGAL_KERNEL_NO_WARNINGS` switches off the warnings -in only the kernel. Other packages have their own specific -terms as documented in the corresponding chapters of the -reference manual. - -For a new package you will first have to create a suitable header file -with all macro definitions. This is done with the shell script -cgal_create_assertions.sh, to be found in the -scripts directory. - -The following command will create a file optimisation_assertions.h: - -
- sh cgal_create_assertions.sh optimisation - -
- -You should place the generated file in the proper directory (and possibly -rename it). Then you can use the checks in the following fashion. - -\code{.cpp} - #include - - void optimisation_foo( int i) - { - CGAL_optimisation_precondition_msg( i == 42, "Only 42 allowed!"); - // ... - } -\endcode - -The documentation of your new package has to name the term chosen to be -part of the package-specific macros in -order to enable the user to selectively turn off and on the checks of -your package. For example, in the documentation of the optimisation -package you can find a sentence similar to the following. -
- The optimisation code uses the term OPTIMISATION for the checks; - e.g., setting the compile time flag - `CGAL_OPTIMISATION_NO_PRECONDITIONS` switches off precondition - checking in the optimisation code. -
+on the whole library. \cgal offers the possibility to turn checks on +and off just for the kernel. \section secchecks_cgal_assume Suppress warnings using CGAL_assume. diff --git a/Mesh_2/include/CGAL/Constrained_voronoi_diagram_2.h b/Mesh_2/include/CGAL/Constrained_voronoi_diagram_2.h index b03ca56d811..eb61e4bf50a 100644 --- a/Mesh_2/include/CGAL/Constrained_voronoi_diagram_2.h +++ b/Mesh_2/include/CGAL/Constrained_voronoi_diagram_2.h @@ -21,6 +21,7 @@ #include #include #include +#include #include namespace CGAL { @@ -415,8 +416,8 @@ template Cvd_cell_2 dual(const Tr& tr, const typename Tr::Vertex_handle& v) { - CGAL_triangulation_precondition( v != typename Tr::Vertex_handle()); - CGAL_triangulation_precondition( !tr.is_infinite(v)); + CGAL_precondition( v != typename Tr::Vertex_handle()); + CGAL_precondition( !tr.is_infinite(v)); Constrained_voronoi_diagram_2 diagram(tr); return diagram.cvd_cell(v); @@ -436,8 +437,8 @@ Cvd_cell_2 dual(const Tr& tr, // typedef Tr::Geom_traits::Ray_2 Ray; // typedef Tr::Geom_traits::Vector_2 Vector_2; // -// CGAL_triangulation_precondition( v != Vertex_handle()); -// CGAL_triangulation_precondition( !tr.is_infinite(v)); +// CGAL_precondition( v != Vertex_handle()); +// CGAL_precondition( !tr.is_infinite(v)); // // // The Circulator moves ccw. // std::vector segments; diff --git a/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h b/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h index 1a13e725a44..e8f105cd241 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Mesher_3.h @@ -568,7 +568,7 @@ refine_mesh(std::string dump_after_refine_surface_prefix) std::cerr << "Total refining surface time: " << timer.time() << "s" << std::endl; std::cerr << std::endl; - CGAL_triangulation_postcondition(r_tr.is_valid()); + CGAL_postcondition(r_tr.is_valid()); elapsed_time += timer.time(); timer.stop(); timer.reset(); timer.start(); @@ -613,7 +613,7 @@ refine_mesh(std::string dump_after_refine_surface_prefix) std::cerr << "Total refining time: " << timer.time()+elapsed_time << "s" << std::endl; std::cerr << std::endl; - CGAL_triangulation_postcondition(r_tr.is_valid()); + CGAL_postcondition(r_tr.is_valid()); #endif (void)(forced_stop()); // sets *error_code