fix unused variable warnings

This commit is contained in:
Sébastien Loriot 2015-07-16 10:15:33 +02:00
parent 3813dd7b82
commit 84d82c3a8e
9 changed files with 50 additions and 11 deletions

View File

@ -25,7 +25,7 @@
#include <CGAL/Dimension.h>
#include <CGAL/Kernel_traits.h>
#include <CGAL/Cartesian_converter.h>
#include <CGAL/use.h>
/* Definition of functors used internally to copy combinatorial maps attributes
* (we need functors as attributes are stored in tuple, thus all the access
* must be done at compiling time).
@ -346,6 +346,7 @@ struct Default_converter_cmap_attributes
(const Map1& map1, Map2& map2, typename Map1::Dart_const_handle dh1,
typename Map2::Dart_handle dh2) const
{
CGAL_USE(dh2);
CGAL_assertion( map1.template attribute<i>(dh1)!=Map1::null_handle );
CGAL_assertion( map2.template attribute<i>(dh2)==Map2::null_handle );
return internal::Create_attribute_if_same_info_cmap
@ -363,6 +364,7 @@ struct Cast_converter_cmap_attributes
(const Map1& map1, Map2& map2, typename Map1::Dart_const_handle dh1,
typename Map2::Dart_handle dh2) const
{
CGAL_USE(dh2);
CGAL_assertion( map1.template attribute<i>(dh1)!=Map1::null_handle );
CGAL_assertion( map2.template attribute<i>(dh2)==Map2::null_handle );
typename Map2::template Attribute_handle<i>::type

View File

@ -23,6 +23,7 @@
#undef CGAL_NEF_DEBUG
#define CGAL_NEF_DEBUG 227
#include <CGAL/Nef_2/debug.h>
#include <CGAL/use.h>
namespace CGAL {
@ -75,7 +76,7 @@ class SM_walls : SM_decorator<SMap> {
}
SHalfedge_handle find_cap(SVertex_handle sv, Sphere_point sp, Sphere_circle c) {
CGAL_USE(sp);
CGAL_NEF_TRACEN( "find_cap " << sv->source()->point() << ":" << sv->point()
<< " , sp : " << sp );
/*

View File

@ -26,6 +26,7 @@
#define CGAL_MATRIX___H
#include <CGAL/Kernel_d/Vector__.h>
#include <CGAL/use.h>
#include <new>
#include <cstddef> // for std::size_t, std::ptrdiff_t
@ -189,6 +190,7 @@ inline void deallocate_mat_space(vector_pointer*& vi, int d)
inline void check_dimensions(const Matrix_<NT_,AL_>& mat) const
{
CGAL_USE(mat);
CGAL_assertion_msg((dm_ == mat.dm_ && dn_ == mat.dn_),
"Matrix::check_dimensions: incompatible matrix dimensions.") ;
}

View File

@ -28,6 +28,7 @@
#include <CGAL/basic.h>
#include <CGAL/memory.h>
#include <CGAL/Kernel_d/debug.h>
#include <CGAL/use.h>
#include <cmath>
#include <memory>
@ -120,6 +121,7 @@ protected:
inline void
check_dimensions(const Vector_<NT_,AL_>& vec) const
{
CGAL_USE(vec);
CGAL_assertion_msg((d_ == vec.d_),
"Vector_::check_dimensions: object dimensions disagree.");
}

View File

@ -32,6 +32,8 @@
#define CGAL_NEF_DEBUG 223
#include <CGAL/Nef_2/debug.h>
#include <CGAL/use.h>
namespace CGAL {
@ -169,7 +171,7 @@ class Gaussian_map :
}
public:
void visit(Vertex_const_handle v) { CGAL_NEF_TRACEN( "Vertices " << v->point() );}
void visit(Vertex_const_handle v) { CGAL_USE(v); CGAL_NEF_TRACEN( "Vertices " << v->point() );}
void visit(Halfedge_const_handle ) {}
void visit(SHalfedge_const_handle ) {}
void visit(SHalfloop_const_handle ) {}

View File

@ -32,6 +32,7 @@
#undef CGAL_NEF_DEBUG
#define CGAL_NEF_DEBUG 31
#include <CGAL/Nef_2/debug.h>
#include <CGAL/use.h>
namespace CGAL {
@ -135,8 +136,11 @@ Vertex_handle new_vertex(const Point& p) const
return p.vertex(); }
Halfedge_handle new_halfedge_pair_at_source(Vertex_handle v)
{ CGAL_NEF_TRACEN("new_edge "<<&*v<<" "<<edge_number+1);
return ++edge_number; }
{
CGAL_USE(v);
CGAL_NEF_TRACEN("new_edge "<<&*v<<" "<<edge_number+1);
return ++edge_number;
}
void supporting_segment(Halfedge_handle e, I it)
{ if ( From[it] != E() ) Support[e] = From[it]; }
@ -215,7 +219,9 @@ int compare_xy(const Point_2& p1, const Point_2& p2) const {
}
Point_2 intersection(const Segment_2& s1, const Segment_2& s2) const
{ CGAL_assertion(target(s1).vertex()==target(s2).vertex());
{
CGAL_USE(s2);
CGAL_assertion(target(s1).vertex()==target(s2).vertex());
return target(s1); }
bool left_turn(const Point_3& p1, const Point_3& p2, const Point_3& p3) const

View File

@ -40,6 +40,8 @@
#define CGAL_NEF_DEBUG 43
#include <CGAL/Nef_2/debug.h>
#include <CGAL/use.h>
namespace CGAL {
struct int_lt {
@ -245,10 +247,12 @@ public:
}
void visit(Vertex_handle h) {
CGAL_USE(h);
CGAL_NEF_TRACEN("visit v "<<h->point());
}
void visit(Halfedge_handle h) {
CGAL_USE(h);
CGAL_NEF_TRACEN("visit he "<< h->source()->point());
}

View File

@ -46,6 +46,8 @@
#include <LEDA/system/memory.h>
#endif
#include <CGAL/use.h>
namespace CGAL {
template <typename Decorator_, typename I>
@ -114,7 +116,11 @@ struct SMO_from_segs {
}
void assert_equal_marks(Vertex_handle v1, Vertex_handle v2) const
{ CGAL_assertion(v1->mark()==v2->mark()); }
{
CGAL_USE(v1);
CGAL_USE(v2);
CGAL_assertion(v1->mark()==v2->mark());
}
void discard_info(Vertex_handle v) const
{
@ -126,7 +132,11 @@ struct SMO_from_segs {
}
void assert_equal_marks(Halfedge_handle e1, Halfedge_handle e2) const
{ CGAL_assertion(e1->mark()==e2->mark()); }
{
CGAL_USE(e1);
CGAL_USE(e2);
CGAL_assertion(e1->mark()==e2->mark());
}
void discard_info(Halfedge_handle ) const {}
@ -281,7 +291,10 @@ Halfedge_handle halfedge_below(Vertex_handle v) const
{ return G.halfedge_below(v); }
void assert_equal_marks(Vertex_handle v1, Vertex_handle v2) const
{ CGAL_NEF_TRACEV(G.mark(v1,0));CGAL_NEF_TRACEV(G.mark(v1,1));
{
CGAL_USE(v1);
CGAL_USE(v2);
CGAL_NEF_TRACEV(G.mark(v1,0));CGAL_NEF_TRACEV(G.mark(v1,1));
CGAL_NEF_TRACEV(G.mark(v2,0));CGAL_NEF_TRACEV(G.mark(v2,1));
CGAL_assertion(G.mark(v1,0)==G.mark(v2,0)&&
G.mark(v1,1)==G.mark(v2,1)); }
@ -289,8 +302,12 @@ void discard_info(Vertex_handle v) const
{ G.discard_info(v); }
void assert_equal_marks(Halfedge_handle e1, Halfedge_handle e2) const
{ CGAL_assertion(G.mark(e1,0)==G.mark(e2,0) &&
G.mark(e1,1)==G.mark(e2,1)); }
{
CGAL_USE(e1);
CGAL_USE(e2);
CGAL_assertion(G.mark(e1,0)==G.mark(e2,0) &&
G.mark(e1,1)==G.mark(e2,1));
}
void discard_info(Halfedge_handle e) const
{ G.discard_info(e); }

View File

@ -49,6 +49,8 @@
#include <iostream>
#include <cstdlib>
#include <CGAL/use.h>
namespace OpenNL {
@ -436,6 +438,7 @@ protected:
}
void check_state(State s) {
CGAL_USE(s);
CGAL_assertion(state_ == s) ;
}