mirror of https://github.com/CGAL/cgal
Fix compilation errors with C++11 and Boost-1.56
Use *explicit* conversions to `bool`, for boost::shared_ptr and boost::optional. Conflicts: Convex_hull_3/include/CGAL/Convex_hull_3/dual/halfspace_intersection_3.h
This commit is contained in:
parent
5134b29461
commit
8cfe633b2c
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ public:
|
|||
//typedef typename Root_of_2::RT RT_2;
|
||||
typename Intersection_traits<CK, Line_2, Line_2>::result_type
|
||||
v = CGAL::internal::intersection(support, l1, CK());
|
||||
CGAL_assertion(v);
|
||||
CGAL_assertion(bool(v));
|
||||
|
||||
const Point_2 *pt = CGAL::internal::intersect_get<Point_2>(v);
|
||||
CGAL_assertion(pt != NULL);
|
||||
|
|
|
|||
|
|
@ -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<typename Kernel::Point_3>(obj);
|
||||
CGAL_kernel_assertion(inter!=NULL);
|
||||
prev=&(* inter_pts.insert(it,*inter) );
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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." );
|
||||
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ void Polygon_offset_builder_2<Ss,Gt,Cont,Visitor>::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()) ) ;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue