mirror of https://github.com/CGAL/cgal
Fix all warnings in demo/Polyhedron/
The compilation was fix g++-4.8, and the flags: --std=c++11 -frounding-math Wall -Wno-array-bounds -Wno-uninitialized
This commit is contained in:
parent
81eb67270c
commit
e87dad0f95
|
|
@ -29,6 +29,7 @@
|
|||
#include <CGAL/type_traits.h>
|
||||
#include <CGAL/Coercion_traits.h>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <CGAL/use.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
@ -263,6 +264,7 @@ class Algebraic_structure_traits_base< Type_,
|
|||
const Type& y) const {
|
||||
typedef Algebraic_structure_traits<Type> AST;
|
||||
typedef typename AST::Is_exact Is_exact;
|
||||
CGAL_USE_TYPE(Is_exact);
|
||||
typename AST::Div actual_div;
|
||||
|
||||
CGAL_precondition_msg(
|
||||
|
|
@ -358,6 +360,7 @@ class Algebraic_structure_traits_base< Type_,
|
|||
Type& r ) const {
|
||||
typedef Coercion_traits< NT1, NT2 > CT;
|
||||
typedef typename CT::Type Type;
|
||||
CGAL_USE_TYPE(Type);
|
||||
CGAL_static_assertion((
|
||||
::boost::is_same<Type , Type >::value));
|
||||
|
||||
|
|
@ -459,6 +462,7 @@ class Algebraic_structure_traits_base< Type_, Field_tag >
|
|||
const Type& y) const {
|
||||
typedef Algebraic_structure_traits<Type> AST;
|
||||
typedef typename AST::Is_exact Is_exact;
|
||||
CGAL_USE_TYPE(Is_exact);
|
||||
CGAL_precondition_code( bool ie = Is_exact::value; )
|
||||
CGAL_precondition_msg( !ie || (x / y) * y == x,
|
||||
"'x' must be divisible by 'y' in "
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@
|
|||
#include <CGAL/Arrangement_2/Arr_traits_adaptor_2.h>
|
||||
#include <CGAL/Sweep_line_2/Sweep_line_2_utils.h>
|
||||
#include <CGAL/Sweep_line_2/Sweep_line_2_visitors.h>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <CGAL/use.h>
|
||||
|
||||
#include <boost/type_traits.hpp>
|
||||
|
||||
|
|
@ -614,6 +616,7 @@ insert_non_intersecting_curve
|
|||
Traits_adaptor_2;
|
||||
typedef typename Arr::Vertex_const_handle Vertex_const_handle;
|
||||
typedef typename Arr::Halfedge_const_handle Halfedge_const_handle;
|
||||
CGAL_USE_TYPE(Halfedge_const_handle);
|
||||
|
||||
const Traits_adaptor_2 * geom_traits =
|
||||
static_cast<const Traits_adaptor_2*> (arr.geometry_traits());
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
#undef CGAL_NEF_DEBUG
|
||||
#define CGAL_NEF_DEBUG 239
|
||||
#include <CGAL/Nef_2/debug.h>
|
||||
#include <CGAL/use.h>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
@ -144,6 +145,7 @@ int is_reflex_sedge(typename SNC_structure::SHalfedge_handle se,
|
|||
result |= 2;
|
||||
|
||||
typedef typename SNC_structure::Sphere_segment Sphere_segment;
|
||||
CGAL_USE_TYPE(Sphere_segment);
|
||||
if(os1 == ON_POSITIVE_SIDE &&
|
||||
se2->twin()->source()->point() == dir)
|
||||
CGAL_assertion(Sphere_segment(se2->source()->point(), se2->twin()->source()->point(), se2->circle()).is_long());
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ ch_graham_andrew_scan( BidirectionalIterator first,
|
|||
OutputIterator result,
|
||||
const Traits& ch_traits)
|
||||
{
|
||||
typedef typename Traits::Point_2 Point_2;
|
||||
typedef typename Traits::Left_turn_2 Left_turn;
|
||||
|
||||
std::vector< BidirectionalIterator > S;
|
||||
|
|
@ -100,6 +99,7 @@ ch_graham_andrew_scan( BidirectionalIterator first,
|
|||
|| defined(NDEBUG)
|
||||
OutputIterator res(result);
|
||||
#else
|
||||
typedef typename Traits::Point_2 Point_2;
|
||||
Tee_for_output_iterator<OutputIterator,Point_2> res(result);
|
||||
#endif // no postconditions ...
|
||||
for ( ++stack_iter; stack_iter != S.end(); ++stack_iter)
|
||||
|
|
|
|||
|
|
@ -375,6 +375,7 @@ Protect_edges_sizing_field<C3T3, MD, Sf>::
|
|||
insert_point(const Bare_point& p, const Weight& w, int dim, const Index& index)
|
||||
{
|
||||
typedef typename Tr::size_type size_type;
|
||||
CGAL_USE_TYPE(size_type);
|
||||
|
||||
// Insert point
|
||||
CGAL_assertion_code(size_type nb_vertices_before = c3t3_.triangulation().number_of_vertices());
|
||||
|
|
|
|||
|
|
@ -1393,13 +1393,9 @@ public:
|
|||
|
||||
void new_input_polyhedron(Polyhedron& P)
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
std::pair<typename Poly_to_map_node::iterator,bool> res =
|
||||
#endif
|
||||
CGAL_assertion_code((std::pair<typename Poly_to_map_node::iterator,bool>) res = )
|
||||
polyhedron_to_map_node_to_polyhedron_vertex.insert(std::make_pair( &P,Node_to_polyhedron_vertex_map() ));
|
||||
#ifndef NDEBUG
|
||||
CGAL_assertion(res.second == true);
|
||||
#endif
|
||||
}
|
||||
|
||||
//1) split_halfedges and retriangulate faces with no intersection point interior to the facet
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include <CGAL/circulator.h> // for CGAL::Circulator_from_container<C>
|
||||
#include <sstream>
|
||||
#include <boost/format.hpp>
|
||||
#include <CGAL/use.h>
|
||||
|
||||
namespace CGAL {
|
||||
namespace Surface_mesher {
|
||||
|
|
@ -121,7 +122,6 @@ namespace Surface_mesher {
|
|||
tr.geom_traits().compute_squared_length_3_object();
|
||||
|
||||
typedef std::vector<Point_3> Edge_dual;
|
||||
typedef typename Edge_dual::size_type size_type;
|
||||
Edge_dual edge_dual;
|
||||
edge_dual.reserve(12);
|
||||
|
||||
|
|
@ -145,6 +145,8 @@ namespace Surface_mesher {
|
|||
// incident cell.
|
||||
typename Tr::Cell_circulator begin = circ;
|
||||
|
||||
typedef typename Edge_dual::size_type size_type;
|
||||
CGAL_USE_TYPE(size_type);
|
||||
CGAL_assertion_code(size_type number_of_finite_incident_cells = 0);
|
||||
CGAL_assertion_code(size_type number_of_infinite_incident_cells = 0);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue