Merge pull request #6302 from afabri/P2T2-assert-GF

CGAL: In testcode do not use CGAL_assertion but assert
This commit is contained in:
Laurent Rineau 2022-02-08 23:44:24 +01:00
commit d78a7b9255
26 changed files with 125 additions and 97 deletions

View File

@ -103,7 +103,7 @@ void test_CR_for(const NT& f){
// try chinese remainder // try chinese remainder
do{ do{
// chinese remainder failed if q > 2*max_coeff(f) // chinese remainder failed if q > 2*max_coeff(f)
CGAL_postcondition_msg(pq < p*(2*max_coeff), " chinese remainder failed "); assert(pq < p*(2*max_coeff));
prime_index++; prime_index++;
if(prime_index < 1000){ if(prime_index < 1000){

View File

@ -19,6 +19,7 @@
#include <CGAL/circulator.h> #include <CGAL/circulator.h>
#include <CGAL/Unique_hash_map.h> #include <CGAL/Unique_hash_map.h>
#include <CGAL/assertions.h>
#include <boost/iterator/iterator_facade.hpp> #include <boost/iterator/iterator_facade.hpp>
#include <boost/unordered_set.hpp> #include <boost/unordered_set.hpp>
@ -934,7 +935,7 @@ public:
void build_TM_vertices_vector(std::vector<TM_vertex_descriptor>& tm_vds) const void build_TM_vertices_vector(std::vector<TM_vertex_descriptor>& tm_vds) const
{ {
assert(tm_vds.empty()); CGAL_precondition(tm_vds.empty());
// If the input is a list of integers, we need to build a correspondence // If the input is a list of integers, we need to build a correspondence
// between vertices and integers. // between vertices and integers.
@ -1008,7 +1009,7 @@ public:
TM_halfedge_descriptor add_seams(InputIterator first, InputIterator last) TM_halfedge_descriptor add_seams(InputIterator first, InputIterator last)
{ {
// must have an even number of input vertices // must have an even number of input vertices
assert(std::distance(first, last) % 2 == 0); CGAL_precondition(std::distance(first, last) % 2 == 0);
TM_halfedge_descriptor tmhd = boost::graph_traits<TM>::null_halfedge(); TM_halfedge_descriptor tmhd = boost::graph_traits<TM>::null_halfedge();
InputIterator it = first; InputIterator it = first;

View File

@ -22,6 +22,7 @@
#include <CGAL/boost/graph/alpha_expansion_graphcut.h> #include <CGAL/boost/graph/alpha_expansion_graphcut.h>
#include <CGAL/squared_distance_3.h> #include <CGAL/squared_distance_3.h>
#include <CGAL/assertions.h>
namespace CGAL { namespace CGAL {
@ -1112,7 +1113,7 @@ void expand_face_selection_for_removal(const FaceRange& faces_to_be_deleted,
for(halfedge_descriptor f_hd : faces_traversed) for(halfedge_descriptor f_hd : faces_traversed)
{ {
assert(target(f_hd, tm) == vd); CGAL_assertion(target(f_hd, tm) == vd);
put(is_selected, face(f_hd, tm), true); put(is_selected, face(f_hd, tm), true);
vertices_queue.insert( target( next(f_hd, tm), tm) ); vertices_queue.insert( target( next(f_hd, tm), tm) );
vertices_queue.insert( source(f_hd, tm) ); vertices_queue.insert( source(f_hd, tm) );

View File

@ -13,6 +13,7 @@
#define CGAL_COMBINATORIAL_MAP_H 1 #define CGAL_COMBINATORIAL_MAP_H 1
#include <CGAL/disable_warnings.h> #include <CGAL/disable_warnings.h>
#include <CGAL/assertions.h>
#include <CGAL/Combinatorial_map_fwd.h> #include <CGAL/Combinatorial_map_fwd.h>
@ -2627,7 +2628,7 @@ namespace CGAL {
if ( marks[acells[i]]==INVALID_MARK ) if ( marks[acells[i]]==INVALID_MARK )
{ {
marks[acells[i]] = get_new_mark(); marks[acells[i]] = get_new_mark();
assert(is_whole_map_unmarked(marks[acells[i]])); CGAL_assertion(is_whole_map_unmarked(marks[acells[i]]));
} }
} }
@ -3636,9 +3637,9 @@ namespace CGAL {
} }
} }
assert(is_whole_map_unmarked(m1)); CGAL_postcondition(is_whole_map_unmarked(m1));
assert(is_whole_map_unmarked(markpush)); CGAL_postcondition(is_whole_map_unmarked(markpush));
assert(map2.is_whole_map_unmarked(m2)); CGAL_postcondition(map2.is_whole_map_unmarked(m2));
free_mark(m1); free_mark(m1);
free_mark(markpush); free_mark(markpush);
map2.free_mark(m2); map2.free_mark(m2);
@ -4660,7 +4661,7 @@ namespace CGAL {
} }
// Make copies of the new facet for dimension >=4 // Make copies of the new facet for dimension >=4
assert(!is_free(first, 2)); CGAL_assertion(!is_free(first, 2));
for ( unsigned int dim=4; dim<=dimension; ++dim ) for ( unsigned int dim=4; dim<=dimension; ++dim )
{ {
if ( !is_free(beta(first, 2), dim) ) if ( !is_free(beta(first, 2), dim) )
@ -4684,7 +4685,7 @@ namespace CGAL {
basic_link_beta_for_involution<2>(beta(it, 3, 2, dim), dd); basic_link_beta_for_involution<2>(beta(it, 3, 2, dim), dd);
} }
assert(!is_free(it, 2)); CGAL_assertion(!is_free(it, 2));
this->template basic_link_beta_for_involution<2>(beta(it, 2, dim), d); this->template basic_link_beta_for_involution<2>(beta(it, 2, dim), d);
if ( prec!=null_handle ) if ( prec!=null_handle )

View File

@ -12,6 +12,8 @@
#ifndef CGAL_GENERALIZED_MAP_H #ifndef CGAL_GENERALIZED_MAP_H
#define CGAL_GENERALIZED_MAP_H 1 #define CGAL_GENERALIZED_MAP_H 1
#include <CGAL/assertions.h>
#include <CGAL/Generalized_map_fwd.h> #include <CGAL/Generalized_map_fwd.h>
#include <CGAL/Combinatorial_map/internal/Combinatorial_map_utility.h> #include <CGAL/Combinatorial_map/internal/Combinatorial_map_utility.h>
#include <CGAL/Generalized_map/internal/Generalized_map_group_functors.h> #include <CGAL/Generalized_map/internal/Generalized_map_group_functors.h>
@ -755,14 +757,14 @@ namespace CGAL {
void set_next(Dart_handle dh1, Dart_handle dh2) void set_next(Dart_handle dh1, Dart_handle dh2)
{ {
assert(!this->template is_free<0>(dh1)); CGAL_assertion(!this->template is_free<0>(dh1));
this->template link_alpha<1>(this->template alpha<0>(dh1), dh2); } this->template link_alpha<1>(this->template alpha<0>(dh1), dh2); }
template<unsigned int dim> template<unsigned int dim>
void set_opposite(Dart_handle dh1, Dart_handle dh2) void set_opposite(Dart_handle dh1, Dart_handle dh2)
{ {
assert(!this->template is_free<0>(dh1)); CGAL_assertion(!this->template is_free<0>(dh1));
assert(!this->template is_free<0>(dh2)); CGAL_assertion(!this->template is_free<0>(dh2));
this->template link_alpha<dim>(this->template alpha<0>(dh1), dh2); this->template link_alpha<dim>(this->template alpha<0>(dh1), dh2);
this->template link_alpha<dim>(dh1, this->template alpha<0>(dh2)); this->template link_alpha<dim>(dh1, this->template alpha<0>(dh2));
} }
@ -780,7 +782,7 @@ namespace CGAL {
size_type number_of_halfedges() const size_type number_of_halfedges() const
{ {
assert(is_without_boundary(0)); CGAL_assertion(is_without_boundary(0));
return number_of_darts()/2; return number_of_darts()/2;
} }
@ -1752,7 +1754,7 @@ namespace CGAL {
if ( marks[acells[i]]==INVALID_MARK ) if ( marks[acells[i]]==INVALID_MARK )
{ {
marks[acells[i]] = get_new_mark(); marks[acells[i]] = get_new_mark();
assert(is_whole_map_unmarked(marks[acells[i]])); CGAL_assertion(is_whole_map_unmarked(marks[acells[i]]));
} }
} }
@ -2632,9 +2634,9 @@ namespace CGAL {
} }
} }
assert(is_whole_map_unmarked(m1)); CGAL_postcondition(is_whole_map_unmarked(m1));
assert(is_whole_map_unmarked(markpush)); CGAL_postcondition(is_whole_map_unmarked(markpush));
assert(map2.is_whole_map_unmarked(m2)); CGAL_postcondition(map2.is_whole_map_unmarked(m2));
free_mark(m1); free_mark(m1);
free_mark(markpush); free_mark(markpush);
map2.free_mark(m2); map2.free_mark(m2);
@ -2771,11 +2773,11 @@ namespace CGAL {
if (aorientationmark==INVALID_MARK) if (aorientationmark==INVALID_MARK)
{ {
assert(is_whole_map_marked(orientationmark)); CGAL_assertion(is_whole_map_marked(orientationmark));
free_mark(orientationmark); free_mark(orientationmark);
} }
assert(is_whole_map_marked(ccmark)); CGAL_assertion(is_whole_map_marked(ccmark));
free_mark(ccmark); free_mark(ccmark);
} }
@ -2817,11 +2819,11 @@ namespace CGAL {
if (aorientationmark==INVALID_MARK) if (aorientationmark==INVALID_MARK)
{ {
assert(is_whole_map_unmarked(orientationmark)); CGAL_assertion(is_whole_map_unmarked(orientationmark));
free_mark(orientationmark); free_mark(orientationmark);
} }
assert(is_whole_map_unmarked(ccmark)); CGAL_postcondition(is_whole_map_unmarked(ccmark));
free_mark(ccmark); free_mark(ccmark);
return orientable; return orientable;

View File

@ -22,6 +22,7 @@
#include <CGAL/Constrained_triangulation_plus_2.h> #include <CGAL/Constrained_triangulation_plus_2.h>
#include <CGAL/Cartesian_converter.h> #include <CGAL/Cartesian_converter.h>
#include <CGAL/IO/Color.h> #include <CGAL/IO/Color.h>
#include <CGAL/assertions.h>
#include <vector> #include <vector>
#include <cstdlib> #include <cstdlib>
@ -58,7 +59,7 @@ namespace internal
++nb; ++nb;
} }
assert(nb>0); CGAL_assertion(nb>0);
return (typename Kernel_traits<Vector>::Kernel::Construct_scaled_vector_3() return (typename Kernel_traits<Vector>::Kernel::Construct_scaled_vector_3()
(normal, 1.0/nb)); (normal, 1.0/nb));
} }

View File

@ -52,6 +52,7 @@
#include <CGAL/Qt/CreateOpenGLContext.h> #include <CGAL/Qt/CreateOpenGLContext.h>
#include <CGAL/Qt/constraint.h> #include <CGAL/Qt/constraint.h>
#include <CGAL/Random.h> #include <CGAL/Random.h>
#include <CGAL/assertions.h>
namespace CGAL namespace CGAL
{ {
@ -612,7 +613,7 @@ protected:
vao[VAO_MONO_POINTS].bind(); vao[VAO_MONO_POINTS].bind();
unsigned int bufn = 0; unsigned int bufn = 0;
assert(bufn<NB_VBO_BUFFERS); CGAL_assertion(bufn<NB_VBO_BUFFERS);
buffers[bufn].bind(); buffers[bufn].bind();
buffers[bufn].allocate(arrays[POS_MONO_POINTS].data(), buffers[bufn].allocate(arrays[POS_MONO_POINTS].data(),
static_cast<int>(arrays[POS_MONO_POINTS].size()*sizeof(float))); static_cast<int>(arrays[POS_MONO_POINTS].size()*sizeof(float)));
@ -629,7 +630,7 @@ protected:
vao[VAO_COLORED_POINTS].bind(); vao[VAO_COLORED_POINTS].bind();
++bufn; ++bufn;
assert(bufn<NB_VBO_BUFFERS); CGAL_assertion(bufn<NB_VBO_BUFFERS);
buffers[bufn].bind(); buffers[bufn].bind();
buffers[bufn].allocate(arrays[POS_COLORED_POINTS].data(), buffers[bufn].allocate(arrays[POS_COLORED_POINTS].data(),
static_cast<int>(arrays[POS_COLORED_POINTS].size()*sizeof(float))); static_cast<int>(arrays[POS_COLORED_POINTS].size()*sizeof(float)));
@ -638,7 +639,7 @@ protected:
buffers[bufn].release(); buffers[bufn].release();
++bufn; ++bufn;
assert(bufn<NB_VBO_BUFFERS); CGAL_assertion(bufn<NB_VBO_BUFFERS);
buffers[bufn].bind(); buffers[bufn].bind();
buffers[bufn].allocate(arrays[COLOR_POINTS].data(), buffers[bufn].allocate(arrays[COLOR_POINTS].data(),
static_cast<int>(arrays[COLOR_POINTS].size()*sizeof(float))); static_cast<int>(arrays[COLOR_POINTS].size()*sizeof(float)));
@ -654,7 +655,7 @@ protected:
vao[VAO_MONO_SEGMENTS].bind(); vao[VAO_MONO_SEGMENTS].bind();
++bufn; ++bufn;
assert(bufn<NB_VBO_BUFFERS); CGAL_assertion(bufn<NB_VBO_BUFFERS);
buffers[bufn].bind(); buffers[bufn].bind();
buffers[bufn].allocate(arrays[POS_MONO_SEGMENTS].data(), buffers[bufn].allocate(arrays[POS_MONO_SEGMENTS].data(),
static_cast<int>(arrays[POS_MONO_SEGMENTS].size()*sizeof(float))); static_cast<int>(arrays[POS_MONO_SEGMENTS].size()*sizeof(float)));
@ -671,7 +672,7 @@ protected:
vao[VAO_COLORED_SEGMENTS].bind(); vao[VAO_COLORED_SEGMENTS].bind();
++bufn; ++bufn;
assert(bufn<NB_VBO_BUFFERS); CGAL_assertion(bufn<NB_VBO_BUFFERS);
buffers[bufn].bind(); buffers[bufn].bind();
buffers[bufn].allocate(arrays[POS_COLORED_SEGMENTS].data(), buffers[bufn].allocate(arrays[POS_COLORED_SEGMENTS].data(),
static_cast<int>(arrays[POS_COLORED_SEGMENTS].size()*sizeof(float))); static_cast<int>(arrays[POS_COLORED_SEGMENTS].size()*sizeof(float)));
@ -681,7 +682,7 @@ protected:
buffers[bufn].release(); buffers[bufn].release();
++bufn; ++bufn;
assert(bufn<NB_VBO_BUFFERS); CGAL_assertion(bufn<NB_VBO_BUFFERS);
buffers[bufn].bind(); buffers[bufn].bind();
buffers[bufn].allocate(arrays[COLOR_SEGMENTS].data(), buffers[bufn].allocate(arrays[COLOR_SEGMENTS].data(),
static_cast<int>(arrays[COLOR_SEGMENTS].size()*sizeof(float))); static_cast<int>(arrays[COLOR_SEGMENTS].size()*sizeof(float)));
@ -699,7 +700,7 @@ protected:
vao[VAO_MONO_RAYS].bind(); vao[VAO_MONO_RAYS].bind();
++bufn; ++bufn;
assert(bufn<NB_VBO_BUFFERS); CGAL_assertion(bufn<NB_VBO_BUFFERS);
buffers[bufn].bind(); buffers[bufn].bind();
buffers[bufn].allocate(arrays[POS_MONO_RAYS].data(), buffers[bufn].allocate(arrays[POS_MONO_RAYS].data(),
static_cast<int>(arrays[POS_MONO_RAYS].size()*sizeof(float))); static_cast<int>(arrays[POS_MONO_RAYS].size()*sizeof(float)));
@ -717,7 +718,7 @@ protected:
vao[VAO_COLORED_RAYS].bind(); vao[VAO_COLORED_RAYS].bind();
++bufn; ++bufn;
assert(bufn<NB_VBO_BUFFERS); CGAL_assertion(bufn<NB_VBO_BUFFERS);
buffers[bufn].bind(); buffers[bufn].bind();
buffers[bufn].allocate(arrays[POS_COLORED_RAYS].data(), buffers[bufn].allocate(arrays[POS_COLORED_RAYS].data(),
static_cast<int>(arrays[POS_COLORED_RAYS].size()*sizeof(float))); static_cast<int>(arrays[POS_COLORED_RAYS].size()*sizeof(float)));
@ -727,7 +728,7 @@ protected:
buffers[bufn].release(); buffers[bufn].release();
++bufn; ++bufn;
assert(bufn<NB_VBO_BUFFERS); CGAL_assertion(bufn<NB_VBO_BUFFERS);
buffers[bufn].bind(); buffers[bufn].bind();
buffers[bufn].allocate(arrays[COLOR_RAYS].data(), buffers[bufn].allocate(arrays[COLOR_RAYS].data(),
static_cast<int>(arrays[COLOR_RAYS].size()*sizeof(float))); static_cast<int>(arrays[COLOR_RAYS].size()*sizeof(float)));
@ -744,7 +745,7 @@ protected:
vao[VAO_MONO_LINES].bind(); vao[VAO_MONO_LINES].bind();
++bufn; ++bufn;
assert(bufn<NB_VBO_BUFFERS); CGAL_assertion(bufn<NB_VBO_BUFFERS);
buffers[bufn].bind(); buffers[bufn].bind();
buffers[bufn].allocate(arrays[POS_MONO_LINES].data(), buffers[bufn].allocate(arrays[POS_MONO_LINES].data(),
static_cast<int>(arrays[POS_MONO_LINES].size()*sizeof(float))); static_cast<int>(arrays[POS_MONO_LINES].size()*sizeof(float)));
@ -762,7 +763,7 @@ protected:
vao[VAO_COLORED_LINES].bind(); vao[VAO_COLORED_LINES].bind();
++bufn; ++bufn;
assert(bufn<NB_VBO_BUFFERS); CGAL_assertion(bufn<NB_VBO_BUFFERS);
buffers[bufn].bind(); buffers[bufn].bind();
buffers[bufn].allocate(arrays[POS_COLORED_LINES].data(), buffers[bufn].allocate(arrays[POS_COLORED_LINES].data(),
static_cast<int>(arrays[POS_COLORED_LINES].size()*sizeof(float))); static_cast<int>(arrays[POS_COLORED_LINES].size()*sizeof(float)));
@ -772,7 +773,7 @@ protected:
buffers[bufn].release(); buffers[bufn].release();
++bufn; ++bufn;
assert(bufn<NB_VBO_BUFFERS); CGAL_assertion(bufn<NB_VBO_BUFFERS);
buffers[bufn].bind(); buffers[bufn].bind();
buffers[bufn].allocate(arrays[COLOR_LINES].data(), buffers[bufn].allocate(arrays[COLOR_LINES].data(),
static_cast<int>(arrays[COLOR_LINES].size()*sizeof(float))); static_cast<int>(arrays[COLOR_LINES].size()*sizeof(float)));
@ -792,7 +793,7 @@ protected:
// 5.1.1) points of the mono faces // 5.1.1) points of the mono faces
++bufn; ++bufn;
assert(bufn<NB_VBO_BUFFERS); CGAL_assertion(bufn<NB_VBO_BUFFERS);
buffers[bufn].bind(); buffers[bufn].bind();
buffers[bufn].allocate(arrays[POS_MONO_FACES].data(), buffers[bufn].allocate(arrays[POS_MONO_FACES].data(),
static_cast<int>(arrays[POS_MONO_FACES].size()*sizeof(float))); static_cast<int>(arrays[POS_MONO_FACES].size()*sizeof(float)));
@ -803,7 +804,7 @@ protected:
// 5.1.2) normals of the mono faces // 5.1.2) normals of the mono faces
++bufn; ++bufn;
assert(bufn<NB_VBO_BUFFERS); CGAL_assertion(bufn<NB_VBO_BUFFERS);
buffers[bufn].bind(); buffers[bufn].bind();
if (m_flatShading) if (m_flatShading)
{ {
@ -831,7 +832,7 @@ protected:
// 5.2.1) points of the color faces // 5.2.1) points of the color faces
++bufn; ++bufn;
assert(bufn<NB_VBO_BUFFERS); CGAL_assertion(bufn<NB_VBO_BUFFERS);
buffers[bufn].bind(); buffers[bufn].bind();
buffers[bufn].allocate(arrays[POS_COLORED_FACES].data(), buffers[bufn].allocate(arrays[POS_COLORED_FACES].data(),
static_cast<int>(arrays[POS_COLORED_FACES].size()*sizeof(float))); static_cast<int>(arrays[POS_COLORED_FACES].size()*sizeof(float)));
@ -842,7 +843,7 @@ protected:
// 5.2.2) normals of the color faces // 5.2.2) normals of the color faces
++bufn; ++bufn;
assert(bufn<NB_VBO_BUFFERS); CGAL_assertion(bufn<NB_VBO_BUFFERS);
buffers[bufn].bind(); buffers[bufn].bind();
if (m_flatShading) if (m_flatShading)
{ {
@ -863,7 +864,7 @@ protected:
// 5.2.3) colors of the faces // 5.2.3) colors of the faces
++bufn; ++bufn;
assert(bufn<NB_VBO_BUFFERS); CGAL_assertion(bufn<NB_VBO_BUFFERS);
buffers[bufn].bind(); buffers[bufn].bind();
buffers[bufn].allocate(arrays[COLOR_FACES].data(), buffers[bufn].allocate(arrays[COLOR_FACES].data(),
static_cast<int>(arrays[COLOR_FACES].size()*sizeof(float))); static_cast<int>(arrays[COLOR_FACES].size()*sizeof(float)));
@ -886,7 +887,7 @@ protected:
vao[VAO_CLIPPING_PLANE].bind(); vao[VAO_CLIPPING_PLANE].bind();
++bufn; ++bufn;
assert(bufn < NB_VBO_BUFFERS); CGAL_assertion(bufn < NB_VBO_BUFFERS);
buffers[bufn].bind(); buffers[bufn].bind();
buffers[bufn].allocate(arrays[POS_CLIPPING_PLANE].data(), buffers[bufn].allocate(arrays[POS_CLIPPING_PLANE].data(),
static_cast<int>(arrays[POS_CLIPPING_PLANE].size() * sizeof(float))); static_cast<int>(arrays[POS_CLIPPING_PLANE].size() * sizeof(float)));

View File

@ -17,6 +17,7 @@
#include <CGAL/Origin.h> #include <CGAL/Origin.h>
#include <CGAL/enum.h> #include <CGAL/enum.h>
#include <CGAL/assertions.h>
namespace CGAL { namespace CGAL {
@ -123,7 +124,7 @@ public:
Circle_2 circle = _gt.construct_circle_2_object()(center, sq_radius); Circle_2 circle = _gt.construct_circle_2_object()(center, sq_radius);
// uncomment!!! // uncomment!!!
//assert(circle.has_on_boundary(p) && circle.has_on_boundary(q)); // CGAL_assertion(circle.has_on_boundary(p) && circle.has_on_boundary(q));
if(_gt.orientation_2_object()(p, q, center) == LEFT_TURN) if(_gt.orientation_2_object()(p, q, center) == LEFT_TURN)
return Circular_arc_2(circle, p, q); return Circular_arc_2(circle, p, q);

View File

@ -17,6 +17,7 @@
#include <CGAL/Combinatorial_map/internal/Combinatorial_map_internal_functors.h> #include <CGAL/Combinatorial_map/internal/Combinatorial_map_internal_functors.h>
#include <CGAL/Linear_cell_complex_operations.h> #include <CGAL/Linear_cell_complex_operations.h>
#include <CGAL/Origin.h> #include <CGAL/Origin.h>
#include <CGAL/assertions.h>
#include<map> #include<map>
@ -513,7 +514,7 @@ namespace CGAL {
{ {
for (++it2; it2!=it1end; ) for (++it2; it2!=it1end; )
{ {
assert(*it1!=*it2); CGAL_assertion(*it1!=*it2);
if (!this->template is_opposite_exist<3>(*it2) && if (!this->template is_opposite_exist<3>(*it2) &&
are_facets_opposite_and_same_geometry are_facets_opposite_and_same_geometry
(*it1, this->previous(*it2))) (*it1, this->previous(*it2)))

View File

@ -14,6 +14,7 @@
#include <CGAL/IO/OFF.h> #include <CGAL/IO/OFF.h>
#include <CGAL/Linear_cell_complex_incremental_builder.h> #include <CGAL/Linear_cell_complex_incremental_builder.h>
#include <CGAL/assertions.h>
#include <algorithm> #include <algorithm>
#include <iostream> #include <iostream>
@ -341,7 +342,7 @@ namespace CGAL {
do do
{ {
++n; ++n;
assert(alcc.is_next_exist(cur)); CGAL_assertion(alcc.is_next_exist(cur));
cur=alcc.next(cur); cur=alcc.next(cur);
} }
while(cur!=itall); while(cur!=itall);
@ -356,7 +357,7 @@ namespace CGAL {
writer.write_facet_vertex_index(index[VCI(alcc.vertex_attribute(cur))]); writer.write_facet_vertex_index(index[VCI(alcc.vertex_attribute(cur))]);
alcc.mark(cur, m); alcc.mark(cur, m);
alcc.mark(alcc.other_orientation(cur), m); // for GMap only, for CMap alcc.mark(alcc.other_orientation(cur), m); // for GMap only, for CMap
assert(alcc.is_next_exist(cur)); // marks the same dart twice CGAL_assertion(alcc.is_next_exist(cur)); // marks the same dart twice
cur=alcc.next(cur); cur=alcc.next(cur);
} }
while(cur!=itall); while(cur!=itall);

View File

@ -17,6 +17,7 @@
#include <unordered_map> #include <unordered_map>
#include <initializer_list> #include <initializer_list>
#include <CGAL/Linear_cell_complex_base.h> #include <CGAL/Linear_cell_complex_base.h>
#include <CGAL/assertions.h>
namespace CGAL { namespace CGAL {
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
@ -70,7 +71,7 @@ namespace CGAL {
typename LCC::Dart_handle prev_dart) typename LCC::Dart_handle prev_dart)
{ {
// here we need to create a last dart and 0-link it // here we need to create a last dart and 0-link it
assert(prev_dart!=lcc.null_handle); CGAL_assertion(prev_dart!=lcc.null_handle);
lcc.template link_alpha<0>(prev_dart, lcc.create_dart(vh)); lcc.template link_alpha<0>(prev_dart, lcc.create_dart(vh));
} }
}; };
@ -353,8 +354,8 @@ public:
DH s2=d2; DH s2=d2;
do do
{ {
assert(lcc.is_next_exist(d1) && lcc.is_previous_exist(d2)); CGAL_assertion(lcc.is_next_exist(d1) && lcc.is_previous_exist(d2));
assert(lcc.other_extremity(d2)!=lcc.null_handle); CGAL_assertion(lcc.other_extremity(d2)!=lcc.null_handle);
if (lcc.vertex_attribute(d1)!=lcc.vertex_attribute(d2)) if (lcc.vertex_attribute(d1)!=lcc.vertex_attribute(d2))
{ return false; } { return false; }

View File

@ -15,6 +15,7 @@
#include <CGAL/Cell_iterators.h> #include <CGAL/Cell_iterators.h>
#include <CGAL/Cell_const_iterators.h> #include <CGAL/Cell_const_iterators.h>
#include <CGAL/Origin.h> #include <CGAL/Origin.h>
#include <CGAL/assertions.h>
namespace CGAL { namespace CGAL {
@ -82,7 +83,7 @@ namespace CGAL {
} }
while(adart!=start); while(adart!=start);
assert(nb>0); CGAL_assertion(nb>0);
return (typename LCC::Traits::Construct_scaled_vector()(normal, 1.0/nb)); return (typename LCC::Traits::Construct_scaled_vector()(normal, 1.0/nb));
// return normal / std::sqrt(normal * normal); // return normal / std::sqrt(normal * normal);
} }
@ -201,7 +202,7 @@ namespace CGAL {
} }
while(adart!=start); while(adart!=start);
assert(nb>1); CGAL_assertion(nb>1);
return typename LCC::Traits::Construct_translated_point() return typename LCC::Traits::Construct_translated_point()
(CGAL::ORIGIN, typename LCC::Traits::Construct_scaled_vector() (CGAL::ORIGIN, typename LCC::Traits::Construct_scaled_vector()
(vec, 1.0/nb)); (vec, 1.0/nb));

View File

@ -29,6 +29,7 @@
#include <CGAL/boost/graph/helpers.h> #include <CGAL/boost/graph/helpers.h>
#include <CGAL/iterator.h> #include <CGAL/iterator.h>
#include <CGAL/assertions.h>
#define CGAL_LCC_TEMPLATE_ARGS template<unsigned int d_, unsigned int ambient_dim, \ #define CGAL_LCC_TEMPLATE_ARGS template<unsigned int d_, unsigned int ambient_dim, \
class Traits_, \ class Traits_, \
@ -66,7 +67,7 @@ struct EdgeHandle : Dart_handle
Dart_handle second_halfedge() const Dart_handle second_halfedge() const
{ {
assert(*this!=nullptr); CGAL_assertion(*this!=nullptr);
return (*this)->get_f(2); return (*this)->get_f(2);
} }

View File

@ -37,7 +37,7 @@ public:
void delegate( Modifier_base<int>& modifier) { void delegate( Modifier_base<int>& modifier) {
modifier(i); modifier(i);
// check validity // check validity
CGAL_postcondition( i > 0); assert( i > 0);
} }
int get_i() const { return i;} // read access int get_i() const { return i;} // read access
}; };

View File

@ -22,6 +22,8 @@
#include <CGAL/Nef_3/SNC_iteration.h> #include <CGAL/Nef_3/SNC_iteration.h>
#include <CGAL/circulator.h> #include <CGAL/circulator.h>
#include <CGAL/Random.h> #include <CGAL/Random.h>
#include <CGAL/assertions.h>
#include <unordered_map> #include <unordered_map>
namespace CGAL { namespace CGAL {
@ -209,7 +211,7 @@ protected:
++nb; ++nb;
} }
assert(nb > 0); CGAL_assertion(nb > 0);
return (typename Local_kernel::Construct_scaled_vector_3()(normal, 1.0 / nb)); return (typename Local_kernel::Construct_scaled_vector_3()(normal, 1.0 / nb));
} }

View File

@ -24,6 +24,7 @@
#include <CGAL/Named_function_parameters.h> #include <CGAL/Named_function_parameters.h>
#include <CGAL/boost/graph/named_params_helper.h> #include <CGAL/boost/graph/named_params_helper.h>
#include <CGAL/demangle.h> #include <CGAL/demangle.h>
#include <CGAL/assertions.h>
#include <algorithm> #include <algorithm>
#include <iterator> #include <iterator>
@ -475,7 +476,7 @@ public:
iterator insert (const Point& p, const Vector& n) iterator insert (const Point& p, const Vector& n)
{ {
iterator out = insert (p); iterator out = insert (p);
assert (has_normal_map()); CGAL_assertion(has_normal_map());
m_normals[size()-1] = n; m_normals[size()-1] = n;
return out; return out;
} }

View File

@ -69,6 +69,7 @@
#include <CGAL/AABB_primitive.h> #include <CGAL/AABB_primitive.h>
#include <CGAL/Dynamic_property_map.h> #include <CGAL/Dynamic_property_map.h>
#include <CGAL/assertions.h>
#ifdef CGAL_ENVELOPE_DEBUG #ifdef CGAL_ENVELOPE_DEBUG
// This is for computing the surface mesh of a prism // This is for computing the surface mesh of a prism
@ -1753,7 +1754,7 @@ private:
inter = Implicit_Seg_Facet_interpoint_Out_Prism_return_local_id_with_face_order_jump_over(ip, filtered_intersection, intersect_face, coverlist, jump1, check_id); inter = Implicit_Seg_Facet_interpoint_Out_Prism_return_local_id_with_face_order_jump_over(ip, filtered_intersection, intersect_face, coverlist, jump1, check_id);
assert(inter != 2);// the point must exist because it is a seg-halfplane intersection CGAL_assertion(inter != 2);// the point must exist because it is a seg-halfplane intersection
if (inter == 1) { if (inter == 1) {
return true; return true;
@ -2084,7 +2085,7 @@ private:
std::cout << p.ep << " | " << p.eq << " | " << p.er << std::endl; std::cout << p.ep << " | " << p.eq << " | " << p.er << std::endl;
ePoint_3 pv(ver[faces[i][0]].x(), ver[faces[i][0]].y(),ver[faces[i][0]].z()); ePoint_3 pv(ver[faces[i][0]].x(), ver[faces[i][0]].y(),ver[faces[i][0]].z());
Orientation ori = orientation(p.ep, p.eq, p.er, pv); Orientation ori = orientation(p.ep, p.eq, p.er, pv);
assert(ori == NEGATIVE); CGAL_assertion(ori == NEGATIVE);
} }
#endif #endif

View File

@ -221,7 +221,7 @@ typename Poly::Halfedge_handle make_cube_3( Poly& P) {
Halfedge_handle e = P.split_edge( f); Halfedge_handle e = P.split_edge( f);
e->vertex()->point() = Point( 1, 1, 1); // Fig. (e) e->vertex()->point() = Point( 1, 1, 1); // Fig. (e)
P.split_facet( e, f->next()->next()); // Fig. (f) P.split_facet( e, f->next()->next()); // Fig. (f)
CGAL_postcondition( P.is_valid()); assert( P.is_valid());
return h; return h;
} }

View File

@ -5,6 +5,7 @@
#include <CGAL/Polynomial_traits_d.h> #include <CGAL/Polynomial_traits_d.h>
#include <CGAL/Random.h> #include <CGAL/Random.h>
#include <cmath> #include <cmath>
#include <cassert>
namespace CGAL { namespace CGAL {
@ -36,7 +37,7 @@ generate_sparse_random_polynomial(CGAL::Random random, int max_degree = 6){
Monom_rep monom_rep; Monom_rep monom_rep;
monom_rep.push_back(Monom(exps,c)); monom_rep.push_back(Monom(exps,c));
result += construct(monom_rep.begin(), monom_rep.end()); result += construct(monom_rep.begin(), monom_rep.end());
CGAL_postcondition(result.degree() >= 0); assert(result.degree() >= 0);
} }
// std::cout << result << std::endl; // std::cout << result << std::endl;
return result; return result;

View File

@ -32,6 +32,7 @@
#include <CGAL/CC_safe_handle.h> #include <CGAL/CC_safe_handle.h>
#include <CGAL/Time_stamper.h> #include <CGAL/Time_stamper.h>
#include <CGAL/Has_member.h> #include <CGAL/Has_member.h>
#include <CGAL/assertions.h>
#include <boost/mpl/if.hpp> #include <boost/mpl/if.hpp>
@ -480,7 +481,7 @@ public:
// We use the block structure to provide an efficient version : // We use the block structure to provide an efficient version :
// we check if the address is in the range of each block. // we check if the address is in the range of each block.
assert(cit != end()); CGAL_assertion(cit != end());
const_pointer c = &*cit; const_pointer c = &*cit;
size_type res=0; size_type res=0;
@ -1050,7 +1051,7 @@ namespace internal {
bool operator<(const CC_iterator& other) const bool operator<(const CC_iterator& other) const
{ {
#ifdef CGAL_COMPACT_CONTAINER_DEBUG_TIME_STAMP #ifdef CGAL_COMPACT_CONTAINER_DEBUG_TIME_STAMP
assert( is_time_stamp_valid() ); CGAL_assertion( is_time_stamp_valid() );
#endif #endif
return Time_stamper::less(m_ptr, other.m_ptr); return Time_stamper::less(m_ptr, other.m_ptr);
} }
@ -1058,7 +1059,7 @@ namespace internal {
bool operator>(const CC_iterator& other) const bool operator>(const CC_iterator& other) const
{ {
#ifdef CGAL_COMPACT_CONTAINER_DEBUG_TIME_STAMP #ifdef CGAL_COMPACT_CONTAINER_DEBUG_TIME_STAMP
assert( is_time_stamp_valid() ); CGAL_assertion( is_time_stamp_valid() );
#endif #endif
return Time_stamper::less(other.m_ptr, m_ptr); return Time_stamper::less(other.m_ptr, m_ptr);
} }
@ -1066,7 +1067,7 @@ namespace internal {
bool operator<=(const CC_iterator& other) const bool operator<=(const CC_iterator& other) const
{ {
#ifdef CGAL_COMPACT_CONTAINER_DEBUG_TIME_STAMP #ifdef CGAL_COMPACT_CONTAINER_DEBUG_TIME_STAMP
assert( is_time_stamp_valid() ); CGAL_assertion( is_time_stamp_valid() );
#endif #endif
return Time_stamper::less(m_ptr, other.m_ptr) return Time_stamper::less(m_ptr, other.m_ptr)
|| (*this == other); || (*this == other);
@ -1075,7 +1076,7 @@ namespace internal {
bool operator>=(const CC_iterator& other) const bool operator>=(const CC_iterator& other) const
{ {
#ifdef CGAL_COMPACT_CONTAINER_DEBUG_TIME_STAMP #ifdef CGAL_COMPACT_CONTAINER_DEBUG_TIME_STAMP
assert( is_time_stamp_valid() ); CGAL_assertion( is_time_stamp_valid() );
#endif #endif
return Time_stamper::less(other.m_ptr, m_ptr) return Time_stamper::less(other.m_ptr, m_ptr)
|| (*this == other); || (*this == other);

View File

@ -27,6 +27,7 @@
#include <CGAL/Compact_container.h> #include <CGAL/Compact_container.h>
#include <CGAL/assertions.h>
#include <CGAL/memory.h> #include <CGAL/memory.h>
#include <CGAL/iterator.h> #include <CGAL/iterator.h>
#include <CGAL/CC_safe_handle.h> #include <CGAL/CC_safe_handle.h>
@ -481,7 +482,7 @@ public:
// We use the block structure to provide an efficient version : // We use the block structure to provide an efficient version :
// we check if the address is in the range of each block. // we check if the address is in the range of each block.
assert(cit != end()); CGAL_assertion(cit != end());
const_pointer c = &*cit; const_pointer c = &*cit;
size_type res=0; size_type res=0;

View File

@ -22,6 +22,8 @@
#define BOOST_RELAXED_HEAP_HEADER #define BOOST_RELAXED_HEAP_HEADER
#include <CGAL/assertions.h>
#include <functional> #include <functional>
#include <boost/property_map/property_map.hpp> #include <boost/property_map/property_map.hpp>
#include <boost/optional.hpp> #include <boost/optional.hpp>
@ -192,7 +194,7 @@ public:
void remove(const value_type& x) void remove(const value_type& x)
{ {
group* a = &index_to_group[get(id, x) / log_n]; group* a = &index_to_group[get(id, x) / log_n];
assert(groups[get(id, x)]); CGAL_assertion(groups[get(id, x)]);
a->value = x; a->value = x;
a->kind = smallest_key; a->kind = smallest_key;
promote(a); promote(a);
@ -203,14 +205,14 @@ public:
value_type& top() value_type& top()
{ {
find_smallest(); find_smallest();
assert(smallest_value->value != boost::none); CGAL_assertion(smallest_value->value != boost::none);
return *smallest_value->value; return *smallest_value->value;
} }
const value_type& top() const const value_type& top() const
{ {
find_smallest(); find_smallest();
assert(smallest_value->value != boost::none); CGAL_assertion(smallest_value->value != boost::none);
return *smallest_value->value; return *smallest_value->value;
} }
@ -236,7 +238,7 @@ public:
rank_type r = x->rank; rank_type r = x->rank;
group* p = x->parent; group* p = x->parent;
{ {
assert(x->value != boost::none); CGAL_assertion(x->value != boost::none);
// Find x's group // Find x's group
size_type start = get(id, *x->value) - get(id, *x->value) % log_n; size_type start = get(id, *x->value) - get(id, *x->value) % log_n;
@ -276,7 +278,7 @@ public:
y->parent = p; y->parent = p;
p->children[r] = y; p->children[r] = y;
assert(r == y->rank); CGAL_assertion(r == y->rank);
if (A[y->rank] == x) if (A[y->rank] == x)
A[y->rank] = do_compare(y, p) ? y : 0; A[y->rank] = do_compare(y, p) ? y : 0;
} }
@ -368,7 +370,7 @@ public:
} }
else else
{ {
assert(p->parent == p); CGAL_assertion(p->parent == p);
} }
} }
if (!in_progress) if (!in_progress)
@ -481,10 +483,10 @@ private:
void promote(group* a) void promote(group* a)
{ {
assert(a != 0); CGAL_assertion(a != 0);
rank_type r = a->rank; rank_type r = a->rank;
group* p = a->parent; group* p = a->parent;
assert(p != 0); CGAL_assertion(p != 0);
if (do_compare(a, p)) if (do_compare(a, p))
{ {
// s is the rank + 1 sibling // s is the rank + 1 sibling
@ -500,7 +502,7 @@ private:
} }
else else
{ {
assert(s != 0); CGAL_assertion(s != 0);
if (A[r + 1] == s) if (A[r + 1] == s)
active_sibling_transform(a, s); active_sibling_transform(a, s);
else else
@ -511,7 +513,7 @@ private:
group* combine(group* a1, group* a2) group* combine(group* a1, group* a2)
{ {
assert(a1->rank == a2->rank); CGAL_assertion(a1->rank == a2->rank);
if (do_compare(a2, a1)) if (do_compare(a2, a1))
do_swap(a1, a2); do_swap(a1, a2);
a1->children[a1->rank++] = a2; a1->children[a1->rank++] = a2;
@ -528,7 +530,7 @@ private:
rank_type s = q->rank - 2; rank_type s = q->rank - 2;
group* x = q->children[s]; group* x = q->children[s];
group* xp = qp->children[s]; group* xp = qp->children[s];
assert(s == x->rank); CGAL_assertion(s == x->rank);
// If x is active, swap x and xp // If x is active, swap x and xp
if (A[s] == x) if (A[s] == x)
@ -549,35 +551,35 @@ private:
// p is a's parent // p is a's parent
group* p = a->parent; group* p = a->parent;
assert(p != 0); CGAL_assertion(p != 0);
// g is p's parent (a's grandparent) // g is p's parent (a's grandparent)
group* g = p->parent; group* g = p->parent;
assert(g != 0); CGAL_assertion(g != 0);
// a' <- A(r) // a' <- A(r)
assert(A[r] != 0); CGAL_assertion(A[r] != 0);
group* ap = A[r]; group* ap = A[r];
assert(ap != 0); CGAL_assertion(ap != 0);
// A(r) <- nil // A(r) <- nil
A[r] = 0; A[r] = 0;
// let a' have parent p' // let a' have parent p'
group* pp = ap->parent; group* pp = ap->parent;
assert(pp != 0); CGAL_assertion(pp != 0);
// let a' have grandparent g' // let a' have grandparent g'
group* gp = pp->parent; group* gp = pp->parent;
assert(gp != 0); CGAL_assertion(gp != 0);
// Remove a and a' from their parents // Remove a and a' from their parents
assert(ap CGAL_assertion(ap
== pp->children[pp->rank - 1]); // Guaranteed because ap is active == pp->children[pp->rank - 1]); // Guaranteed because ap is active
--pp->rank; --pp->rank;
// Guaranteed by caller // Guaranteed by caller
assert(a == p->children[p->rank - 1]); CGAL_assertion(a == p->children[p->rank - 1]);
--p->rank; --p->rank;
// Note: a, ap, p, pp all have rank r // Note: a, ap, p, pp all have rank r
@ -590,7 +592,7 @@ private:
// Assuming k(p) <= k(p') // Assuming k(p) <= k(p')
// make p' the rank r child of p // make p' the rank r child of p
assert(r == p->rank); CGAL_assertion(r == p->rank);
p->children[p->rank++] = pp; p->children[p->rank++] = pp;
pp->parent = p; pp->parent = p;
@ -598,7 +600,7 @@ private:
group* c = combine(a, ap); group* c = combine(a, ap);
// make c the rank r+1 child of g' // make c the rank r+1 child of g'
assert(gp->rank > r + 1); CGAL_assertion(gp->rank > r + 1);
gp->children[r + 1] = c; gp->children[r + 1] = c;
c->parent = gp; c->parent = gp;
@ -622,10 +624,10 @@ private:
group* g = p->parent; group* g = p->parent;
// remove a, s from their parents // remove a, s from their parents
assert(s->parent == p); CGAL_assertion(s->parent == p);
assert(p->children[p->rank - 1] == s); CGAL_assertion(p->children[p->rank - 1] == s);
--p->rank; --p->rank;
assert(p->children[p->rank - 1] == a); CGAL_assertion(p->children[p->rank - 1] == a);
--p->rank; --p->rank;
rank_type r = a->rank; rank_type r = a->rank;
@ -634,7 +636,7 @@ private:
group* c = combine(a, s); group* c = combine(a, s);
// make c the rank r+2 child of g // make c the rank r+2 child of g
assert(g->children[r + 2] == p); CGAL_assertion(g->children[r + 2] == p);
g->children[r + 2] = c; g->children[r + 2] = c;
c->parent = g; c->parent = g;
if (A[r + 2] == p) if (A[r + 2] == p)
@ -650,7 +652,7 @@ private:
#endif #endif
rank_type r = a->rank; rank_type r = a->rank;
group* c = s->children[s->rank - 1]; group* c = s->children[s->rank - 1];
assert(c->rank == r); CGAL_assertion(c->rank == r);
if (A[r] == c) if (A[r] == c)
{ {
#if defined(BOOST_RELAXED_HEAP_DEBUG) && BOOST_RELAXED_HEAP_DEBUG > 1 #if defined(BOOST_RELAXED_HEAP_DEBUG) && BOOST_RELAXED_HEAP_DEBUG > 1
@ -667,7 +669,7 @@ private:
p->children[r] = s; p->children[r] = s;
// combine a, c and let the result by the rank r+1 child of p // combine a, c and let the result by the rank r+1 child of p
assert(p->rank > r + 1); CGAL_assertion(p->rank > r + 1);
group* x = combine(a, c); group* x = combine(a, c);
x->parent = p; x->parent = p;
p->children[r + 1] = x; p->children[r + 1] = x;

View File

@ -15,6 +15,7 @@
#include <CGAL/license/Surface_mesh_parameterization.h> #include <CGAL/license/Surface_mesh_parameterization.h>
#include <CGAL/disable_warnings.h> #include <CGAL/disable_warnings.h>
#include <CGAL/assertions.h>
#include <CGAL/Surface_mesh_parameterization/internal/kernel_traits.h> #include <CGAL/Surface_mesh_parameterization/internal/kernel_traits.h>
#include <CGAL/Surface_mesh_parameterization/Error_code.h> #include <CGAL/Surface_mesh_parameterization/Error_code.h>
@ -23,6 +24,7 @@
#include <CGAL/boost/graph/iterator.h> #include <CGAL/boost/graph/iterator.h>
#include <cfloat> #include <cfloat>
#include <climits> #include <climits>
#include <vector> #include <vector>
@ -200,7 +202,7 @@ private:
VertexParameterizedMap vpmap, VertexParameterizedMap vpmap,
Offset_map& offset) Offset_map& offset)
{ {
assert(offset.empty()); CGAL_assertion(offset.empty());
put(vpmap, v0, true); put(vpmap, v0, true);
put(vpmap, v1, true); put(vpmap, v1, true);
@ -234,7 +236,7 @@ private:
if(get(vpmap, vt)) { if(get(vpmap, vt)) {
// If both extremeties of a segment are corners, offsets are already correct // If both extremeties of a segment are corners, offsets are already correct
if(!get(vpmap, vs)) { if(!get(vpmap, vs)) {
assert(len != 0.0); CGAL_assertion(len != 0.0);
double ld = 1.0 / len; double ld = 1.0 / len;
for(std::size_t i=index_of_previous_corner+1; i<=current_index; ++i) { for(std::size_t i=index_of_previous_corner+1; i<=current_index; ++i) {
// ld * offset[i] is in [0;1[ // ld * offset[i] is in [0;1[
@ -333,7 +335,7 @@ public:
for(halfedge_descriptor hd : halfedges_around_face(start_hd, mesh)) { for(halfedge_descriptor hd : halfedges_around_face(start_hd, mesh)) {
vertex_descriptor vd = source(hd, mesh); vertex_descriptor vd = source(hd, mesh);
Point_2 uv; Point_2 uv;
assert(counter < offset.size()); CGAL_assertion(counter < offset.size());
if(corners_encountered == 0) if(corners_encountered == 0)
uv = Point_2(offset[counter++], 0.0); uv = Point_2(offset[counter++], 0.0);

View File

@ -13,6 +13,7 @@
#define CGAL_FACE_GRAPH_WRAPPER_H 1 #define CGAL_FACE_GRAPH_WRAPPER_H 1
#include <CGAL/license/Surface_mesh_topology.h> #include <CGAL/license/Surface_mesh_topology.h>
#include <CGAL/assertions.h>
#include <CGAL/Surface_mesh_topology/internal/Functors_for_face_graph_wrapper.h> #include <CGAL/Surface_mesh_topology/internal/Functors_for_face_graph_wrapper.h>
#include <CGAL/Surface_mesh_topology/internal/Iterators_for_face_graph_wrapper.h> #include <CGAL/Surface_mesh_topology/internal/Iterators_for_face_graph_wrapper.h>
@ -23,6 +24,7 @@
#include <CGAL/Generalized_map_fwd.h> #include <CGAL/Generalized_map_fwd.h>
#include <CGAL/Linear_cell_complex_fwd.h> #include <CGAL/Linear_cell_complex_fwd.h>
#include <CGAL/Polygonal_schema_fwd.h> #include <CGAL/Polygonal_schema_fwd.h>
#include <bitset> #include <bitset>
namespace CGAL namespace CGAL
@ -614,7 +616,7 @@ public:
if (marks[acells[i]]==INVALID_MARK ) if (marks[acells[i]]==INVALID_MARK )
{ {
marks[acells[i]]=get_new_mark(); marks[acells[i]]=get_new_mark();
assert(is_whole_map_unmarked(marks[acells[i]])); CGAL_assertion(is_whole_map_unmarked(marks[acells[i]]));
} }
} }

View File

@ -13,6 +13,7 @@
#define CGAL_PATH_GENERATORS_H 1 #define CGAL_PATH_GENERATORS_H 1
#include <CGAL/license/Surface_mesh_topology.h> #include <CGAL/license/Surface_mesh_topology.h>
#include <CGAL/assertions.h>
#include <CGAL/Random.h> #include <CGAL/Random.h>
#include <unordered_set> #include <unordered_set>
@ -174,7 +175,7 @@ generate_random_connected_set_of_faces(const LCC& lcc, std::size_t nb,
{ return NULL; } { return NULL; }
} }
assert (border_faces.size()!=0); CGAL_assertion(border_faces.size()!=0);
typename LCC::Dart_const_handle dhres=border_faces[0]; typename LCC::Dart_const_handle dhres=border_faces[0];
while(lcc.template is_free<2>(dhres) || while(lcc.template is_free<2>(dhres) ||
lcc.is_marked(lcc.template beta<2>(dhres), amark)) lcc.is_marked(lcc.template beta<2>(dhres), amark))

View File

@ -18,6 +18,7 @@
#include <initializer_list> #include <initializer_list>
#include <CGAL/draw_linear_cell_complex.h> #include <CGAL/draw_linear_cell_complex.h>
#include <CGAL/Path_on_surface.h> #include <CGAL/Path_on_surface.h>
#include <CGAL/assertions.h>
#ifdef CGAL_USE_BASIC_VIEWER #ifdef CGAL_USE_BASIC_VIEWER
@ -52,7 +53,7 @@ struct LCC_geom_utils<CGAL::Face_graph_wrapper<Mesh>, Local_kernel, 3>
} }
while(adart!=dh); while(adart!=dh);
assert(nb>0); CGAL_assertion(nb>0);
return typename Get_traits<Mesh>::Kernel::Construct_scaled_vector_3() return typename Get_traits<Mesh>::Kernel::Construct_scaled_vector_3()
(normal, 1.0/nb); (normal, 1.0/nb);
} }