Commit 392e46d0 authored by Roland Levillain's avatar Roland Levillain
Browse files

Address clang's warnings.

	* mln/algebra/h_vec.hh,
	* mln/core/image/dmorph/sub_image.hh,
	* mln/core/internal/pixel_impl.hh,
	* mln/core/site_set/box.hh,
	* mln/core/site_set/p_array.hh,
	* mln/metal/vec.hh,
	* mln/pw/internal/image_base.hh,
	* mln/topo/adj_higher_face_iter.hh,
	* mln/topo/adj_lower_face_iter.hh,
	* mln/topo/algebraic_face.hh,
	* mln/topo/face.hh,
	* mln/topo/face_data.hh:
	Use `class' and `struct' uniformly in declarations and
	definitions.
	* mln/convert/impl/from_double_to_value.hh,
	* mln/convert/impl/from_float_to_value.hh,
	* mln/convert/impl/from_int_to_value.hh,
	* mln/core/image/complex_window_piter.hh,
	* mln/core/point.hh,
	* mln/opt/element.hh,
	* mln/value/lut_vec.hh:
	Comment out unused arguments.
	* mln/topo/complex.hh [NDEBUG]:	Avoid a warning about an unused
	variable.
parent 93e65faa
2010-11-29 Roland Levillain <roland@lrde.epita.fr>
Address clang's warnings.
* mln/algebra/h_vec.hh,
* mln/core/image/dmorph/sub_image.hh,
* mln/core/internal/pixel_impl.hh,
* mln/core/site_set/box.hh,
* mln/core/site_set/p_array.hh,
* mln/metal/vec.hh,
* mln/pw/internal/image_base.hh,
* mln/topo/adj_higher_face_iter.hh,
* mln/topo/adj_lower_face_iter.hh,
* mln/topo/algebraic_face.hh,
* mln/topo/face.hh,
* mln/topo/face_data.hh:
Use `class' and `struct' uniformly in declarations and
definitions.
* mln/convert/impl/from_double_to_value.hh,
* mln/convert/impl/from_float_to_value.hh,
* mln/convert/impl/from_int_to_value.hh,
* mln/core/image/complex_window_piter.hh,
* mln/core/point.hh,
* mln/opt/element.hh,
* mln/value/lut_vec.hh:
Comment out unused arguments.
* mln/topo/complex.hh [NDEBUG]: Avoid a warning about an unused
variable.
2009-10-06 Roland Levillain <roland@lrde.epita.fr>
 
Update tests/core/image/graph_image.
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2010 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -39,7 +40,7 @@ namespace mln
// Forward declaration.
namespace algebra {
template <unsigned d, typename C> struct h_vec;
template <unsigned d, typename C> class h_vec;
}
......@@ -90,8 +91,9 @@ namespace mln
*
*/
template <unsigned d, typename C>
struct h_vec : public vec<d + 1, C>
class h_vec : public vec<d + 1, C>
{
public:
/// Dimension is the 'natural' one (3 for 3D), not the one of the vector (dim + 1).
enum { dim = d };
......
// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -86,8 +86,8 @@ namespace mln
template <typename V>
inline
void
from_double_to_value(const double& from,
Value<V>& to)
from_double_to_value(const double& /* from */,
Value<V>& /* to */)
{
mlc_abort(V)::check();
}
......
// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2008, 2009, 2010 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -86,8 +87,8 @@ namespace mln
template <typename V>
inline
void
from_float_to_value(const float& from,
Value<V>& to)
from_float_to_value(const float& /* from */,
Value<V>& /* to */)
{
mlc_abort(V)::check();
}
......
// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2008, 2009, 2010 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -73,8 +74,8 @@ namespace mln
template <typename V>
inline
void
from_int_to_value(const int& from,
Value<V>& to)
from_int_to_value(const int& /* from */,
Value<V>& /* to */)
{
mlc_abort(V)::check();
}
......
// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2008, 2009, 2010 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -363,8 +364,9 @@ namespace mln
template <typename Pref>
inline
void
complex_window_bkd_piter<I, G, W>::center_at_(const Pref& c)
complex_window_bkd_piter<I, G, W>::center_at_(const Pref& /* c */)
{
// FIXME: Argument C is not used here... Is this normal?
iter_.center_at(this->center().face());
}
......
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2010 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -98,10 +99,11 @@ namespace mln
/// \ingroup modimagedomainmorpher
//
template <typename I, typename S>
struct sub_image : public internal::image_domain_morpher< I,
class sub_image : public internal::image_domain_morpher< I,
S,
sub_image<I,S> >
{
public:
/// Skeleton.
typedef sub_image< tag::image_<I>, tag::domain_<S> > skeleton;
......
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2010 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -51,7 +52,7 @@ namespace mln
// image whatever it is a fastest one or not.
template <bool is_fastest, typename I, typename E>
class pixel_impl_base_;
struct pixel_impl_base_;
template <typename I, typename E>
......
......@@ -677,7 +677,7 @@ namespace mln
template <typename C>
inline
const util::yes&
cut_(const point<grid::tick,C>& p)
cut_(const point<grid::tick,C>& /* p */)
{
util::yes* the_;
return *the_;
......
......@@ -43,9 +43,9 @@ namespace mln
{
// Fwd decls.
template <typename P> struct box;
template <typename P> struct box_fwd_piter_;
template <typename P> struct box_bkd_piter_;
template <typename P> class box;
template <typename P> class box_fwd_piter_;
template <typename P> class box_bkd_piter_;
namespace trait
......@@ -78,10 +78,11 @@ namespace mln
/// \ingroup modsitesetbasic
//
template <typename P>
struct box : public Box< box<P> >,
public internal::box_impl_< P::dim, mln_coord(P), box<P> >,
private mlc_is_unqualif(P)::check_t
class box : public Box< box<P> >,
public internal::box_impl_< P::dim, mln_coord(P), box<P> >,
private mlc_is_unqualif(P)::check_t
{
public:
/// Dimension.
enum { dim = P::dim };
......
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2010 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -51,9 +52,9 @@ namespace mln
// Forward declarations.
template <typename P> class p_array;
template <typename S> class p_indexed_psite;
template <typename S> struct p_indexed_fwd_piter;
template <typename S> struct p_indexed_bkd_piter;
template <typename S> class p_indexed_psite;
template <typename S> class p_indexed_fwd_piter;
template <typename S> class p_indexed_bkd_piter;
......
// Copyright (C) 2006, 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2006, 2007, 2008, 2009, 2010 EPITA Research and
// Development Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -57,7 +58,7 @@ namespace mln
namespace literal {
struct zero_t;
}
template <unsigned d, typename C> struct h_vec;
template <unsigned d, typename C> class h_vec;
......
// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -60,7 +60,7 @@ namespace mln
template <typename I>
inline
mln_rvalue(I) element_impl(trait::image::category::domain_morpher,
const Image<I>& ima, unsigned index)
const Image<I>& ima, unsigned /* index */)
{
return element(*exact(ima).delegatee_());
}
......@@ -82,7 +82,7 @@ namespace mln
template <typename I>
inline
mln_lvalue(I) element_impl(trait::image::category::domain_morpher,
Image<I>& ima, unsigned index)
Image<I>& ima, unsigned /* index */)
{
return element(*exact(ima).delegatee_());
}
......
// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -49,7 +49,7 @@ namespace mln
{
template <typename F, typename S, typename E>
struct image_base;
class image_base;
} // end of namespace mln::pw::internal
......@@ -111,7 +111,7 @@ namespace mln
/// Parameter \p F is the image value type.
/// Parameter \p S is the image site set type.
template <typename F, typename S, typename E>
struct image_base
class image_base
: public mln::internal::image_primary<mln_result(F), S, E >
{
typedef typename F::mutable_result mutable_result;
......
// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2008, 2009, 2010 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -56,7 +57,7 @@ namespace mln
} // end of mln::topo::internal
template <unsigned D>
struct algebraic_face;
class algebraic_face;
/*------------------------------------.
| topo::adj_higher_face_fwd_iter<D>. |
......
// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2008, 2009, 2010 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -56,7 +57,7 @@ namespace mln
} // end of namespace mln::topo::internal
template <unsigned D>
struct algebraic_face;
class algebraic_face;
/*-----------------------------------.
......
// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2008, 2009, 2010 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -56,7 +57,7 @@ namespace mln
/// Contrary to an mln::topo::algebraic_n_face, the dimension of an
/// mln::topo::algebraic_face is not fixed.
template <unsigned D>
struct algebraic_face : public face<D>
class algebraic_face : public face<D>
{
typedef face<D> super_;
......
// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2008, 2009, 2010 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -961,6 +962,8 @@ namespace mln
{
// If we reached this method, then N should be 0.
mln_precondition(n == 0);
// Prevent ``unused variable'' warnings when NDEBUG is defined.
(void) n;
return f(faces_);
}
......
// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2008, 2009, 2010 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -60,7 +61,7 @@ namespace mln
/// Contrary to an mln::topo::n_face, the dimension of an
/// mln::topo::face is not fixed.
template <unsigned D>
struct face
class face
{
public:
// The type of the complex this handle points to.
......
// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2008, 2009, 2010 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -115,8 +116,8 @@ namespace mln
void connect_lower_dim_face(const algebraic_n_face<N - 1, D>& f);
private:
friend class mln::topo::internal::lower_dim_faces_set_mixin<N, D>;
friend class mln::topo::internal::lower_dim_adj_faces_if_dim_matches_<N, D>;
friend struct mln::topo::internal::lower_dim_faces_set_mixin<N, D>;
friend struct mln::topo::internal::lower_dim_adj_faces_if_dim_matches_<N, D>;
friend lower_dim_faces_type
mln::topo::n_face<N, D>::lower_dim_adj_faces() const;
......@@ -133,8 +134,8 @@ namespace mln
void connect_higher_dim_face(const algebraic_n_face<N + 1, D>& f);
private:
friend class mln::topo::internal::higher_dim_faces_set_mixin<N, D>;
friend class mln::topo::internal::higher_dim_adj_faces_if_dim_matches_<N, D>;
friend struct mln::topo::internal::higher_dim_faces_set_mixin<N, D>;
friend struct mln::topo::internal::higher_dim_adj_faces_if_dim_matches_<N, D>;
friend higher_dim_faces_type
mln::topo::n_face<N, D>::higher_dim_adj_faces() const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment