Skip to content

Commit

Permalink
Merge pull request #6736 from sloriot/STL_extensions-Uncertain_warnings
Browse files Browse the repository at this point in the history
Workaround warning with gcc master
  • Loading branch information
sloriot authored Jul 12, 2022
2 parents 7f49616 + 6acb3a1 commit de2cd5c
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ ArrangementPainterOstream<CGAL::Arr_linear_traits_2<Kernel_>>::operator<<(
QRectF seg_bb = this->convert(seg.bbox());
if (
this->clippingRect.isValid() &&
!this->clippingRect.intersects(seg_bb) &
!this->clippingRect.intersects(seg_bb) &&
(!seg.is_horizontal() && !seg.is_vertical()))
{ return *this; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ class Projection_traits_3 {

Equal_x_2 eqx;
Equal_y_2 eqy;
return eqx(p,q) & eqy(p,q);
return eqx(p,q) && eqy(p,q);
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ search_for_connected_components_in_labeled_image(const CGAL::Image_3& image,
for(uint i=0; i<nx; i++)
{
using CGAL::IMAGEIO::static_evaluate;

if(visited[voxel_index] | second_pass[voxel_index]) {
if(visited[voxel_index] || second_pass[voxel_index]) {
++voxel_index;
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion Number_types/include/CGAL/GMP/Gmpzf_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class Gmpzf :
return;
}
const int p = std::numeric_limits<double>::digits;
CGAL_assertion(CGAL_NTS is_finite(d) & is_valid(d));
CGAL_assertion(CGAL_NTS is_finite(d) && is_valid(d));
int exp;
double x = std::frexp(d, &exp); // x in [1/2, 1], x*2^exp = d
mpz_init_set_d (man(), // to the following integer:
Expand Down
2 changes: 1 addition & 1 deletion Number_types/include/CGAL/MP_Float.h
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ namespace INTERN_MP_FLOAT {
while (true) {
x = x % y;
if (x == 0) {
CGAL_postcondition(internal::divides(y, a) & internal::divides(y, b));
CGAL_postcondition(internal::divides(y, a) && internal::divides(y, b));
y.gcd_normalize();
return y;
}
Expand Down
9 changes: 8 additions & 1 deletion STL_Extension/include/CGAL/Uncertain.h
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,11 @@ Uncertain<bool> operator!(Uncertain<bool> a)
return Uncertain<bool>(!a.sup(), !a.inf());
}

#ifdef __clang__
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunknown-warning-option"
# pragma GCC diagnostic ignored "-Wbitwise-instead-of-logical"
#endif
inline
Uncertain<bool> operator|(Uncertain<bool> a, Uncertain<bool> b)
{
Expand Down Expand Up @@ -324,7 +329,9 @@ Uncertain<bool> operator&(Uncertain<bool> a, bool b)
{
return Uncertain<bool>(a.inf() & b, a.sup() & b);
}

#ifdef __clang__
# pragma GCC diagnostic pop
#endif

// Equality operators

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ bool are_parallel_edges_equally_oriented( Segment_2_with_ID<K> const& e0, Segmen
template<class K>
bool are_edges_orderly_collinear( Segment_2_with_ID<K> const& e0, Segment_2_with_ID<K> const& e1 )
{
return are_edges_collinear(e0,e1) & are_parallel_edges_equally_oriented(e0,e1);
return are_edges_collinear(e0,e1) && are_parallel_edges_equally_oriented(e0,e1);
}


Expand Down

0 comments on commit de2cd5c

Please sign in to comment.