fix pedantic warnings

This commit is contained in:
Sébastien Loriot 2022-05-10 11:30:39 +02:00
parent acbd1ee182
commit 6486844750
11 changed files with 33 additions and 24 deletions

View File

@ -85,7 +85,7 @@ bool check_edge_length(const TriangleMesh& output_mesh,
}
return true;
};
}
template <typename ConcurrencyTag = CGAL::Sequential_tag,
typename TriangleMesh, typename FT,

View File

@ -29,7 +29,7 @@ namespace std {
struct iterator_traits<Toto::Descriptor> {
};
};
}
namespace Nested {

View File

@ -207,7 +207,7 @@ public:
return result;
}; // end of operator()
} // end of operator()
}; // end of functor specialization: Compute_cone_..._2
} // namespace CGAL

View File

@ -33,4 +33,4 @@ int main() {
std::cout << approx << " -- " << expected << '\n';
assert( std::abs(approx - expected) < 0.1 );
}
};
}

View File

@ -278,7 +278,7 @@ inline __m128d swap_m128d(__m128d x){
# ifdef __llvm__
return __builtin_shufflevector(x, x, 1, 0);
# elif defined __GNUC__ && !defined __INTEL_COMPILER
return __builtin_shuffle(x, (__m128i){ 1, 0 });
return __extension__ __builtin_shuffle(x, (__m128i){ 1, 0 });
# else
return _mm_shuffle_pd(x, x, 1);
# endif

View File

@ -49,7 +49,7 @@
// gcc's __builtin_constant_p does not like arguments with side effects. Be
// careful not to use this macro for something that the compiler will have
// trouble eliminating as dead code.
# define CGAL_CST_TRUE(X) ({ bool _ugly_ = (X); __builtin_constant_p(_ugly_) && _ugly_; })
# define CGAL_CST_TRUE(X) __extension__ ({ bool _ugly_ = (X); __builtin_constant_p(_ugly_) && _ugly_; })
#else
# define CGAL_CST_TRUE(X) false
#endif

View File

@ -150,18 +150,27 @@ namespace Boost_MP_internal {
CGAL_assertion(intv.first > 0.0);
CGAL_assertion(intv.second > 0.0);
#ifdef CGAL_LITTLE_ENDIAN
CGAL_assertion_code(
union {
#ifdef CGAL_LITTLE_ENDIAN
struct { uint64_t man:52; uint64_t exp:11; uint64_t sig:1; } s;
#else /* CGAL_BIG_ENDIAN */
//WARNING: untested!
struct { uint64_t sig:1; uint64_t exp:11; uint64_t man:52; } s;
#endif
double d;
} conv;
conv.d = intv.first;
)
#else
//WARNING: untested!
CGAL_assertion_code(
union {
struct { uint64_t sig:1; uint64_t exp:11; uint64_t man:52; } s;
double d;
} conv;
conv.d = intv.first;
)
#endif
// Check that the exponent of intv.inf is 52, which corresponds to a 53 bit integer
CGAL_assertion(conv.s.exp - ((1 << (11 - 1)) - 1) == std::numeric_limits<double>::digits - 1);

View File

@ -209,5 +209,5 @@ int main() {
assert(v1 > v2);
};
}

View File

@ -88,4 +88,4 @@ int main (int, char**)
print_point_set (ps1, "PS1 with PS3 properties + PS3 item copied = ");
return EXIT_SUCCESS;
};
}

View File

@ -65,18 +65,18 @@ class Mesh_3_plugin :
Q_INTERFACES(CGAL::Three::Polyhedron_demo_plugin_interface)
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0" FILE "mesh_3_plugin.json")
Q_PROPERTY(double angle READ get_angle WRITE set_angle);
Q_PROPERTY(double angle READ get_angle WRITE set_angle)
Q_PROPERTY(double sharp_edges_angle_bound
READ get_sharp_edges_angle_bound
WRITE set_sharp_edges_angle_bound);
Q_PROPERTY(double edges_sizing READ get_edges_sizing WRITE set_edges_sizing);
Q_PROPERTY(double facets_sizing READ get_facets_sizing WRITE set_facets_sizing);
Q_PROPERTY(double approx READ get_approx WRITE set_approx);
Q_PROPERTY(double tets_sizing READ get_tets_sizing WRITE set_tets_sizing);
Q_PROPERTY(double tets_shape READ get_tets_shape WRITE set_tets_shape);
Q_PROPERTY(bool protect_features READ get_protect_features WRITE set_protect_features);
Q_PROPERTY(bool protect_borders READ get_protect_borders WRITE set_protect_borders);
Q_PROPERTY(bool manifold_criterion READ get_manifold_criterion WRITE set_manifold_criterion);
WRITE set_sharp_edges_angle_bound)
Q_PROPERTY(double edges_sizing READ get_edges_sizing WRITE set_edges_sizing)
Q_PROPERTY(double facets_sizing READ get_facets_sizing WRITE set_facets_sizing)
Q_PROPERTY(double approx READ get_approx WRITE set_approx)
Q_PROPERTY(double tets_sizing READ get_tets_sizing WRITE set_tets_sizing)
Q_PROPERTY(double tets_shape READ get_tets_shape WRITE set_tets_shape)
Q_PROPERTY(bool protect_features READ get_protect_features WRITE set_protect_features)
Q_PROPERTY(bool protect_borders READ get_protect_borders WRITE set_protect_borders)
Q_PROPERTY(bool manifold_criterion READ get_manifold_criterion WRITE set_manifold_criterion)
typedef CGAL::Mesh_facet_topology Mesh_facet_topology;
Q_ENUMS(Mesh_facet_topology)

View File

@ -1754,7 +1754,7 @@ void Viewer::beginSelection(const QPoint &point)
{
picking_pos = point;
CGAL::QGLViewer::beginSelection(point);
};
}
void Viewer::endSelection(const QPoint& p)
{
CGAL::QGLViewer::endSelection(p);