fix more warnings

This commit is contained in:
Sébastien Loriot 2022-07-06 12:58:49 +02:00
parent ddd0e7dd47
commit 45b5fd43f8
6 changed files with 13 additions and 6 deletions

View File

@ -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; }

View File

@ -960,7 +960,7 @@ public:
Equal_x_2 eqx;
Equal_y_2 eqy;
return eqx(p,q) & eqy(p,q);
return eqx(p,q) && eqy(p,q);
}
};

View File

@ -73,11 +73,18 @@ search_for_connected_components_in_labeled_image(const CGAL::Image_3& image,
for(uint i=0; i<nx; i++)
{
using CGAL::IMAGEIO::static_evaluate;
#ifdef __GNUC__
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunknown-warning-option"
# pragma GCC diagnostic ignored "-Wbitwise-instead-of-logical"
#endif
if(visited[voxel_index] | second_pass[voxel_index]) {
++voxel_index;
continue;
}
#ifdef __GNUC__
# pragma GCC diagnostic pop
#endif
const Label current_label =
transform(static_evaluate<Image_word_type>(image.image(),
voxel_index));

View File

@ -157,7 +157,7 @@ public:
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:

View File

@ -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;
}

View File

@ -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);
}