[GIT] ppl/ppl(master): Avoid a few annoying warnings for unused parameters.

Module: ppl/ppl Branch: master Commit: 5f9556efda1f122c17b38d10cf08e66c07cd2df9 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=5f9556efda1f1...
Author: Enea Zaffanella zaffanella@cs.unipr.it Date: Sat Mar 27 15:19:14 2010 +0100
Avoid a few annoying warnings for unused parameters. Indentation fixed. Avoid using "return;" at the end of function body.
---
src/BD_Shape.templates.hh | 4 ++-- src/Box.templates.hh | 4 ++-- src/Grid_public.cc | 25 ++++++------------------- src/Octagonal_Shape.templates.hh | 4 ++-- src/Polyhedron.defs.hh | 2 +- src/Polyhedron.inlines.hh | 4 ++-- 6 files changed, 15 insertions(+), 28 deletions(-)
diff --git a/src/BD_Shape.templates.hh b/src/BD_Shape.templates.hh index 663ff36..e580ec8 100644 --- a/src/BD_Shape.templates.hh +++ b/src/BD_Shape.templates.hh @@ -6344,7 +6344,7 @@ BD_Shape<T>::fold_space_dimensions(const Variables_Set& vars,
template <typename T> void -BD_Shape<T>::drop_some_non_integer_points(Complexity_Class complexity) { +BD_Shape<T>::drop_some_non_integer_points(Complexity_Class) { if (std::numeric_limits<T>::is_integer) return;
@@ -6354,7 +6354,7 @@ BD_Shape<T>::drop_some_non_integer_points(Complexity_Class complexity) { template <typename T> void BD_Shape<T>::drop_some_non_integer_points(const Variables_Set& vars, - Complexity_Class complexity) { + Complexity_Class) { // Dimension-compatibility check. const dimension_type min_space_dim = vars.space_dimension(); if (space_dimension() < min_space_dim) diff --git a/src/Box.templates.hh b/src/Box.templates.hh index 674fd44..524a4f5 100644 --- a/src/Box.templates.hh +++ b/src/Box.templates.hh @@ -1669,7 +1669,7 @@ Box<ITV>::wrap_assign(const Variables_Set& vars,
template <typename ITV> void -Box<ITV>::drop_some_non_integer_points(Complexity_Class complexity) { +Box<ITV>::drop_some_non_integer_points(Complexity_Class) { if (std::numeric_limits<typename ITV::boundary_type>::is_integer && !ITV::info_type::store_open) return; @@ -1680,7 +1680,7 @@ Box<ITV>::drop_some_non_integer_points(Complexity_Class complexity) { template <typename ITV> void Box<ITV>::drop_some_non_integer_points(const Variables_Set& vars, - Complexity_Class complexity) { + Complexity_Class) { // Dimension-compatibility check. const dimension_type min_space_dim = vars.space_dimension(); if (space_dimension() < min_space_dim) diff --git a/src/Grid_public.cc b/src/Grid_public.cc index ad89369..6d17f57 100644 --- a/src/Grid_public.cc +++ b/src/Grid_public.cc @@ -2851,7 +2851,6 @@ PPL::Grid::wrap_assign(const Variables_Set& vars, } } } - return; }
// FIXME(0.11): Check if this is the correct interpretation of the @@ -2861,20 +2860,14 @@ PPL::Grid::wrap_assign(const Variables_Set& vars, // coordinates. All points in \p *this with non-integral coordinates are // removed. void - PPL::Grid::drop_some_non_integer_points(Complexity_Class) { - - if (marked_empty()) - return; - - // Space dimension = 0: then return - if (space_dim == 0) +PPL::Grid::drop_some_non_integer_points(Complexity_Class) { + if (marked_empty() || space_dim == 0) return;
for (dimension_type i = space_dim; i-- > 0; ) add_congruence(Variable(i) %= 0);
PPL_ASSERT(OK()); - return; }
// FIXME(0.11): Check if this is the correct interpretation of the @@ -2885,28 +2878,22 @@ void // dimensions in vars. All points in \p *this with non-integral coordinates // for the dimensions in vars are removed. void - PPL::Grid::drop_some_non_integer_points(const Variables_Set& vars, - Complexity_Class) { +PPL::Grid::drop_some_non_integer_points(const Variables_Set& vars, + Complexity_Class) { // Dimension-compatibility check. const dimension_type min_space_dim = vars.space_dimension(); if (space_dimension() < min_space_dim) throw_dimension_incompatible("drop_some_non_integer_points(vs, cmpl)", min_space_dim);
- - if (marked_empty()) - return; - - // If vars space dimension is 0: then return - if (min_space_dim == 0) + if (marked_empty() || min_space_dim == 0) return;
for (Variables_Set::const_iterator i = vars.begin(), vars_end = vars.end(); i != vars.end(); ++i) add_congruence(Variable(*i) %= 0);
- PPL_ASSERT(OK()); - return; + PPL_ASSERT(OK()); }
diff --git a/src/Octagonal_Shape.templates.hh b/src/Octagonal_Shape.templates.hh index d0034a7..94dab08 100644 --- a/src/Octagonal_Shape.templates.hh +++ b/src/Octagonal_Shape.templates.hh @@ -7560,7 +7560,7 @@ Octagonal_Shape<T> template <typename T> void Octagonal_Shape<T> -::drop_some_non_integer_points(Complexity_Class complexity) { +::drop_some_non_integer_points(Complexity_Class) { if (std::numeric_limits<T>::is_integer) return;
@@ -7571,7 +7571,7 @@ template <typename T> void Octagonal_Shape<T> ::drop_some_non_integer_points(const Variables_Set& vars, - Complexity_Class complexity) { + Complexity_Class) { // Dimension-compatibility check. const dimension_type min_space_dim = vars.space_dimension(); if (space_dimension() < min_space_dim) diff --git a/src/Polyhedron.defs.hh b/src/Polyhedron.defs.hh index 0a3c86b..a0426f5 100644 --- a/src/Polyhedron.defs.hh +++ b/src/Polyhedron.defs.hh @@ -1621,7 +1621,7 @@ public: Currently there is no optimality guarantee, not even if \p complexity is <CODE>ANY_COMPLEXITY</CODE>. */ - void drop_some_non_integer_points(Complexity_Class complexity + void drop_some_non_integer_points(Complexity_Class complexity = ANY_COMPLEXITY);
/*! \brief diff --git a/src/Polyhedron.inlines.hh b/src/Polyhedron.inlines.hh index 2909057..92b0b1d 100644 --- a/src/Polyhedron.inlines.hh +++ b/src/Polyhedron.inlines.hh @@ -433,8 +433,8 @@ Polyhedron::strictly_contains(const Polyhedron& y) const {
inline void Polyhedron::drop_some_non_integer_points(Complexity_Class complexity) { - drop_some_non_integer_points(static_cast<const Variables_Set*>(0), - complexity); + const Variables_Set* p_vs = 0; + drop_some_non_integer_points(p_vs, complexity); }
inline void
participants (1)
-
Enea Zaffanella