diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h index 52da564cb0c..2e2d76d3462 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Algebraic_curve_kernel_2.h @@ -411,8 +411,8 @@ public: result_type operator() (const argument_type& arg) const { - CGAL_assertion(_inner); - CGAL_assertion(_outer); + CGAL_assertion(bool(_inner)); + CGAL_assertion(bool(_outer)); return _outer.get()(_inner.get()(arg)); } private: diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h index f1e3954f54c..945b743c907 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h @@ -651,7 +651,7 @@ public: //! Returns the defining polynomial Polynomial_2 polynomial_2() const { - CGAL_precondition(this->ptr()->f); + CGAL_precondition(bool(this->ptr()->f)); return this->ptr()->f.get(); } @@ -664,7 +664,7 @@ public: * the curve's defining equation is returned. */ size_type number_of_status_lines_with_event() const { - CGAL_precondition(this->ptr()->f); + CGAL_precondition(bool(this->ptr()->f)); #if CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX if(CGAL::degree(polynomial_2(),1)==2) { return this->conic_number_of_status_lines_with_event(); @@ -1739,7 +1739,7 @@ private: if(! this->ptr()->intermediate_values) { // This is created during event_coordiantes() event_coordinates(); - CGAL_assertion(this->ptr()->intermediate_values); + CGAL_assertion(bool(this->ptr()->intermediate_values)); } return this->ptr()->intermediate_values.get(); } diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h index a9c39bf9126..24fa4de491c 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_pair_analysis_2.h @@ -556,7 +556,7 @@ public: if(! this->ptr()->resultant) { compute_resultant(); } - CGAL_assertion(this->ptr()->resultant); + CGAL_assertion(bool(this->ptr()->resultant)); return this->ptr()->resultant.get(); } @@ -564,7 +564,7 @@ public: if(! this->ptr()->resultant_roots) { compute_resultant_roots_with_multiplicities(); } - CGAL_assertion(this->ptr()->resultant_roots); + CGAL_assertion(bool(this->ptr()->resultant_roots)); return this->ptr()->resultant_roots.get(); } @@ -578,7 +578,7 @@ public: if(! this->ptr()->multiplicities_of_resultant_roots) { compute_resultant_roots_with_multiplicities(); } - CGAL_assertion(this->ptr()->multiplicities_of_resultant_roots); + CGAL_assertion(bool(this->ptr()->multiplicities_of_resultant_roots)); return this->ptr()->multiplicities_of_resultant_roots.get(); } @@ -598,7 +598,7 @@ public: resultant_roots().end(), std::back_inserter(this->ptr()->stripe_values.get())); } - CGAL_assertion(this->ptr()->stripe_values); + CGAL_assertion(bool(this->ptr()->stripe_values)); return this->ptr()->stripe_values.get(); } @@ -606,7 +606,7 @@ public: if(! this->ptr()->event_x_coordinates) { compute_event_x_coordinates_with_event_indices(); } - CGAL_assertion(this->ptr()->event_x_coordinates); + CGAL_assertion(bool(this->ptr()->event_x_coordinates)); return this->ptr()->event_x_coordinates.get(); } @@ -614,7 +614,7 @@ public: if(! this->ptr()->event_indices) { compute_event_x_coordinates_with_event_indices(); } - CGAL_assertion(this->ptr()->event_indices); + CGAL_assertion(bool(this->ptr()->event_indices)); return this->ptr()->event_indices.get(); } @@ -642,7 +642,7 @@ private: if(! this->ptr()->intermediate_values) { compute_intermediate_values_and_slices(); } - CGAL_assertion(this->ptr()->intermediate_values); + CGAL_assertion(bool(this->ptr()->intermediate_values)); return this->ptr()->intermediate_values.get(); } @@ -650,7 +650,7 @@ private: if(! this->ptr()->intermediate_slices) { compute_intermediate_values_and_slices(); } - CGAL_assertion(this->ptr()->intermediate_slices); + CGAL_assertion(bool(this->ptr()->intermediate_slices)); return this->ptr()->intermediate_slices.get(); } @@ -661,7 +661,7 @@ private: if(! this->ptr()->subresultants) { compute_subresultants(); } - CGAL_assertion(this->ptr()->subresultants); + CGAL_assertion(bool(this->ptr()->subresultants)); return this->ptr()->subresultants.get(); } @@ -675,7 +675,7 @@ private: if(! this->ptr()->principal_subresultants) { compute_subresultants(); } - CGAL_assertion(this->ptr()->principal_subresultants); + CGAL_assertion(bool(this->ptr()->principal_subresultants)); return this->ptr()->principal_subresultants.get(); } @@ -690,7 +690,7 @@ private: if(! this->ptr()->coprincipal_subresultants) { compute_subresultants(); } - CGAL_assertion(this->ptr()->coprincipal_subresultants); + CGAL_assertion(bool(this->ptr()->coprincipal_subresultants)); return this->ptr()->coprincipal_subresultants.get(); } @@ -1040,7 +1040,7 @@ public: if(! this->ptr()->event_slices[i]) { this->ptr()->event_slices[i] = create_event_slice(i); } - CGAL_assertion(this->ptr()->event_slices[i]); + CGAL_assertion(bool(this->ptr()->event_slices[i])); return this->ptr()->event_slices[i].get(); } @@ -1084,7 +1084,7 @@ public: } } } - CGAL_assertion(intermediate_values()[i]); + CGAL_assertion(bool(intermediate_values()[i])); return intermediate_values()[i].get(); } diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h index 99625a6f771..ed322c42498 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Status_line_CA_1.h @@ -560,7 +560,7 @@ public: //! Returns the isolator instance Bitstream_descartes& isolator() const { - CGAL_assertion(this->ptr()->isolator); + CGAL_assertion(bool(this->ptr()->isolator)); return this->ptr()->isolator.get(); } diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h index 3a154f798b5..e5865037212 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Xy_coordinate_2.h @@ -387,7 +387,7 @@ public: (*candidates.begin())->high() ); } - CGAL_postcondition(this->ptr()->_m_y); + CGAL_postcondition(bool(this->ptr()->_m_y)); return *this->ptr()->_m_y; } diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h index 5c2d80460eb..6e18d960fad 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/Point_2.h @@ -379,7 +379,7 @@ public: */ inline const Coordinate_2& xy() const { - CGAL_precondition_msg(this->ptr()->_m_xy, + CGAL_precondition_msg(bool(this->ptr()->_m_xy), "Denied access to the curve end lying at x/y-infinity"); return *(this->ptr()->_m_xy); } @@ -514,8 +514,8 @@ public: inline CGAL::Comparison_result compare_xy(const Kernel_point_2& q, bool equal_x = false) const { - CGAL_precondition(this->ptr()->_m_xy); - CGAL_precondition(q.ptr()->_m_xy); + CGAL_precondition(bool(this->ptr()->_m_xy)); + CGAL_precondition(bool(q.ptr()->_m_xy)); CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_POINT(Compare_xy_2, compare_xy_2) CGAL_precondition(dynamic_cast< const Kernel_point_2* >(this) != NULL); @@ -534,7 +534,7 @@ public: bool is_on( const typename Curved_kernel_via_analysis_2::Curve_2& curve ) const { - CGAL_precondition(this->ptr()->_m_xy); + CGAL_precondition(bool(this->ptr()->_m_xy)); CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_POINT(Is_on_2, is_on_2) CGAL_precondition(dynamic_cast< const Kernel_point_2* >(this) != NULL); diff --git a/Circular_kernel_2/include/CGAL/Circular_kernel_2/Line_arc_2.h b/Circular_kernel_2/include/CGAL/Circular_kernel_2/Line_arc_2.h index 3d6de479d3e..aac75c56cf5 100644 --- a/Circular_kernel_2/include/CGAL/Circular_kernel_2/Line_arc_2.h +++ b/Circular_kernel_2/include/CGAL/Circular_kernel_2/Line_arc_2.h @@ -133,7 +133,7 @@ public: //typedef typename Root_of_2::RT RT_2; typename Intersection_traits::result_type v = CGAL::internal::intersection(support, l1, CK()); - CGAL_assertion(v); + CGAL_assertion(bool(v)); const Point_2 *pt = CGAL::internal::intersect_get(v); CGAL_assertion(pt != NULL); diff --git a/Intersections_3/include/CGAL/Triangle_3_Triangle_3_intersection.h b/Intersections_3/include/CGAL/Triangle_3_Triangle_3_intersection.h index 162813a490f..124027f7440 100644 --- a/Intersections_3/include/CGAL/Triangle_3_Triangle_3_intersection.h +++ b/Intersections_3/include/CGAL/Triangle_3_Triangle_3_intersection.h @@ -69,7 +69,7 @@ void intersection_coplanar_triangles_cutoff( ::result_type obj = intersection(Line_3(p,q),Line_3(*prev,curr),k); // assert "not empty" - CGAL_kernel_assertion(obj); + CGAL_kernel_assertion(bool(obj)); const typename Kernel::Point_3* inter=intersect_get(obj); CGAL_kernel_assertion(inter!=NULL); prev=&(* inter_pts.insert(it,*inter) ); diff --git a/Kinetic_data_structures/include/CGAL/Kinetic/Heap_pointer_event_queue.h b/Kinetic_data_structures/include/CGAL/Kinetic/Heap_pointer_event_queue.h index c19832e5562..8a2007707c3 100644 --- a/Kinetic_data_structures/include/CGAL/Kinetic/Heap_pointer_event_queue.h +++ b/Kinetic_data_structures/include/CGAL/Kinetic/Heap_pointer_event_queue.h @@ -401,7 +401,7 @@ public: //! Access the time of a particular event const Priority& priority(const Key &item) const { - CGAL_precondition(item); + CGAL_precondition(bool(item)); return item->time(); } diff --git a/Operations_on_polyhedra/include/CGAL/intersection_of_Polyhedra_3_refinement_visitor.h b/Operations_on_polyhedra/include/CGAL/intersection_of_Polyhedra_3_refinement_visitor.h index d684263d491..77c1f5f50aa 100644 --- a/Operations_on_polyhedra/include/CGAL/intersection_of_Polyhedra_3_refinement_visitor.h +++ b/Operations_on_polyhedra/include/CGAL/intersection_of_Polyhedra_3_refinement_visitor.h @@ -576,7 +576,7 @@ void sew_3_marked_darts( Combinatorial_map_3& final_map, darts_to_remove.insert(not_top); darts_to_remove.insert(not_top->beta(1)); darts_to_remove.insert(not_top->beta(1)->beta(1)); darts_to_remove.insert(not_top->beta(3)); darts_to_remove.insert(not_top->beta(3)->beta(1)); darts_to_remove.insert(not_top->beta(3)->beta(1)->beta(1)); O_Dart_handle current_1=next_marked_dart_around_target_vertex(final_map,not_top,mark_index); - CGAL_precondition(current_1); + CGAL_precondition(bool(current_1)); not_top=*current_1; } while(not_top!=start); diff --git a/Straight_skeleton_2/demo/Straight_skeleton_2/straight_skeleton_2.cpp b/Straight_skeleton_2/demo/Straight_skeleton_2/straight_skeleton_2.cpp index bc3f2362234..f832c7dc38e 100644 --- a/Straight_skeleton_2/demo/Straight_skeleton_2/straight_skeleton_2.cpp +++ b/Straight_skeleton_2/demo/Straight_skeleton_2/straight_skeleton_2.cpp @@ -241,7 +241,7 @@ private slots: builder.enter_contour((*bit)->begin(),(*bit)->end()); } sskel = builder.construct_skeleton() ; - sskel_valid = sskel ; + sskel_valid = bool(sskel) ; if ( !sskel_valid ) QMessageBox::critical( this, my_title_string,"Straight Skeleton construction failed." ); widget->redraw(); @@ -284,7 +284,7 @@ private slots: builder.enter_contour(lFrame,lFrame+4); builder.enter_contour(lOuter.rbegin(),lOuter.rend()); sskel = builder.construct_skeleton() ; - sskel_valid = sskel ; + sskel_valid = bool(sskel) ; if ( !sskel_valid ) QMessageBox::critical( this, my_title_string,"Straight Skeleton construction failed." ); diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h index 7653f01bd9a..97b3f6b4284 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h @@ -226,7 +226,7 @@ void Polygon_offset_builder_2::AddOffsetVertex( FT if ( !lP ) lP = mVisitor.on_offset_point_overflowed(aHook) ; - CGAL_postcondition(lP); + CGAL_postcondition(bool(lP)); CGAL_POLYOFFSET_TRACE(1,"Found offset point p=" << p2str(*lP) << " at offset " << aTime << " along bisector " << e2str(*aHook) << " reaching " << v2str(*aHook->vertex()) ) ;