Commit 93ca680b authored by Guillaume Lazzara's avatar Guillaume Lazzara
Browse files

Fix compilation issues with g++ 4.6.1 and clang++.

	* mln/topo/center_only_iter.hh,
	* mln/topo/face.hh,
	* mln/trait/images.hh,
	* mln/convert/from_to.hxx,
	* mln/core/image/dmorph/sub_image.hh,
	* mln/core/routine/init.hxx,
	* mln/algebra/vec.hh: Make declaration and forward declarations
	consistent.

	* mln/canvas/browsing/backdiagonal2d.hh,
	* mln/canvas/browsing/breadth_first_search.hh,
	* mln/canvas/browsing/depth_first_search.hh,
	* mln/canvas/browsing/diagonal2d.hh,
	* mln/canvas/browsing/directional.hh,
	* mln/canvas/browsing/fwd.hh,
	* mln/canvas/browsing/hyper_directional.hh,
	* mln/canvas/browsing/snake_fwd.hh,
	* mln/canvas/browsing/snake_generic.hh,
	* mln/canvas/browsing/snake_vert.hh,
	* mln/fun/v2v/hsl_to_rgb.hh,
	* mln/literal/black.hh,
	* mln/literal/colors.hh,
	* mln/literal/white.hh: Add a default constructor for global
	variable types.

	* mln/canvas/browsing/internal/graph_first_search.hh: Avoid a
	warning for an unused variable.

	* mln/data/was.median.hh: Fix type of the reference.
parent 812809e6
2011-11-21 Guillaume Lazzara <z@lrde.epita.fr>
Fix compilation issues with g++ 4.6.1 and clang++.
* mln/topo/center_only_iter.hh,
* mln/topo/face.hh,
* mln/trait/images.hh,
* mln/convert/from_to.hxx,
* mln/core/image/dmorph/sub_image.hh,
* mln/core/routine/init.hxx,
* mln/algebra/vec.hh: Make declaration and forward declarations
consistent.
* mln/canvas/browsing/backdiagonal2d.hh,
* mln/canvas/browsing/breadth_first_search.hh,
* mln/canvas/browsing/depth_first_search.hh,
* mln/canvas/browsing/diagonal2d.hh,
* mln/canvas/browsing/dir_struct_elt_incr_update.hh,
* mln/canvas/browsing/directional.hh,
* mln/canvas/browsing/fwd.hh,
* mln/canvas/browsing/hyper_directional.hh,
* mln/canvas/browsing/snake_fwd.hh,
* mln/canvas/browsing/snake_generic.hh,
* mln/canvas/browsing/snake_vert.hh,
* mln/fun/v2v/hsl_to_rgb.hh,
* mln/literal/black.hh,
* mln/literal/colors.hh,
* mln/literal/white.hh: Add a default constructor for global
variable types.
* mln/canvas/browsing/internal/graph_first_search.hh: Avoid a
warning for an unused variable.
* mln/data/was.median.hh: Fix type of the reference.
2011-10-04 Roland Levillain <roland@lrde.epita.fr>
 
Handle the case of filling an empty border.
......@@ -56,7 +56,7 @@ namespace mln
// Forward declarations.
namespace algebra {
template <unsigned n, typename T> class vec;
template <unsigned d, typename C> struct h_vec;
template <unsigned d, typename C> class h_vec;
template <unsigned n, unsigned m, typename T> class mat;
}
......
// Copyright (C) 2007, 2008, 2009, 2010 EPITA Research and Development
// Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2010, 2011 EPITA Research and
// Development Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -82,6 +82,10 @@ namespace mln
*/
struct backdiagonal2d_t : public Browsing< backdiagonal2d_t >
{
// This default constructor is needed for compilation with gcc
// 4.6.0, gcc 4.6.1 and Clang.
backdiagonal2d_t();
template <typename F>
void operator()(F& f) const;
};
......@@ -92,13 +96,15 @@ namespace mln
# ifndef MLN_INCLUDE_ONLY
# ifndef MLN_WO_GLOBAL_VARS
const backdiagonal2d_t backdiagonal2d;
# endif // ! MLN_WO_GLOBAL_VARS
backdiagonal2d_t::backdiagonal2d_t()
{
}
template <typename F>
inline
......
// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2009, 2011 EPITA Research and Development Laboratory
// (LRDE)
//
// This file is part of Olena.
//
......@@ -78,7 +79,11 @@ namespace mln
/// Breadth-first search algorithm for graph, on vertices.
struct breadth_first_search_t :
public internal::graph_first_search_t<breadth_first_search_t, std::queue>
{};
{
// This default constructor is needed for compilation with gcc
// 4.6.0, gcc 4.6.1 and Clang.
breadth_first_search_t();
};
extern const breadth_first_search_t breadth_first_search;
......@@ -88,6 +93,10 @@ namespace mln
const breadth_first_search_t breadth_first_search;
breadth_first_search_t::breadth_first_search_t()
{
}
# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::canvas::browsing
......
// Copyright (C) 2008, 2009, 2010 EPITA Research and Development
// Copyright (C) 2008, 2009, 2010, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
......@@ -79,7 +79,11 @@ namespace mln
/// Breadth-first search algorithm for graph, on vertices.
struct depth_first_search_t :
public internal::graph_first_search_t<depth_first_search_t, std::stack>
{};
{
// This default constructor is needed for compilation with gcc
// 4.6.0, gcc 4.6.1 and Clang.
depth_first_search_t();
};
extern const depth_first_search_t depth_first_search;
......@@ -93,6 +97,10 @@ namespace mln
# endif // ! MLN_WO_GLOBAL_VARS
depth_first_search_t::depth_first_search_t()
{
}
# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::canvas::browsing
......
......@@ -81,6 +81,10 @@ namespace mln
*/
struct diagonal2d_t : public Browsing< diagonal2d_t >
{
// This default constructor is needed for compilation with gcc
// 4.6.0, gcc 4.6.1 and Clang.
diagonal2d_t();
template <typename F>
void operator()(F& f) const;
};
......@@ -95,6 +99,10 @@ namespace mln
# endif // ! MLN_WO_GLOBAL_VARS
diagonal2d_t::diagonal2d_t()
{
}
template <typename F>
inline
......
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -85,6 +86,10 @@ namespace mln
*/
struct dir_struct_elt_incr_update_t : public Browsing< dir_struct_elt_incr_update_t >
{
// This default constructor is needed for compilation with gcc
// 4.6.0, gcc 4.6.1 and Clang.
dir_struct_elt_incr_update_t();
template <typename F>
void operator()(F& f) const;
};
......@@ -95,6 +100,10 @@ namespace mln
const dir_struct_elt_incr_update_t dir_struct_elt_incr_update;
dir_struct_elt_incr_update_t::dir_struct_elt_incr_update_t()
{
}
template <typename F>
inline
void
......
// Copyright (C) 2007, 2008, 2009, 2010 EPITA Research and Development
// Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2010, 2011 EPITA Research and
// Development Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -89,6 +89,10 @@ namespace mln
*/
struct directional_t : public Browsing< directional_t >
{
// This default constructor is needed for compilation with gcc
// 4.6.0, gcc 4.6.1 and Clang.
directional_t();
template <typename F>
void operator()(F& f) const;
};
......@@ -103,6 +107,10 @@ namespace mln
# endif // ! MLN_WO_GLOBAL_VARS
directional_t::directional_t()
{
}
template <typename F>
inline
void
......
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -71,6 +72,10 @@ namespace mln
*/
struct fwd_t : public Browsing< fwd_t >
{
// This default constructor is needed for compilation with gcc
// 4.6.0, gcc 4.6.1 and Clang.
fwd_t();
template <typename F>
void operator()(F& f) const;
};
......@@ -81,6 +86,10 @@ namespace mln
const fwd_t fwd;
fwd_t::fwd_t()
{
}
template <typename F>
inline
void
......
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -73,6 +74,10 @@ namespace mln
*/
struct hyper_directional_t : public Browsing< hyper_directional_t >
{
// This default constructor is needed for compilation with gcc
// 4.6.0, gcc 4.6.1 and Clang.
hyper_directional_t();
template <typename F>
void operator()(F& f) const;
};
......@@ -83,6 +88,10 @@ namespace mln
const hyper_directional_t hyper_directional;
hyper_directional_t::hyper_directional_t()
{
}
template <typename F>
inline
void
......
......@@ -128,6 +128,7 @@ namespace mln
util::vertex_id_t
next(const S& stack)
{
(void) stack;
mln_assertion(0);
/// Not defined yet!
// mlc_abort(S)::check();
......
// Copyright (C) 2007, 2008, 2009, 2010 EPITA Research and Development
// Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2010, 2011 EPITA Research and
// Development Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -83,6 +83,10 @@ namespace mln
struct snake_fwd_t : public Browsing< snake_fwd_t >
{
// This default constructor is needed for compilation with gcc
// 4.6.0, gcc 4.6.1 and Clang.
snake_fwd_t();
template <typename F>
void operator()(F& f) const;
};
......@@ -97,6 +101,9 @@ namespace mln
# endif // ! MLN_WO_GLOBAL_VARS
snake_fwd_t::snake_fwd_t()
{
}
template <typename F>
inline
......
// Copyright (C) 2007, 2008, 2009, 2010 EPITA Research and Development
// Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2010, 2011 EPITA Research and
// Development Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -76,6 +76,10 @@ namespace mln
struct snake_generic_t : public Browsing< snake_generic_t >
{
// This default constructor is needed for compilation with gcc
// 4.6.0, gcc 4.6.1 and Clang.
snake_generic_t();
template <typename F>
void operator()(F& f) const;
......@@ -91,6 +95,9 @@ namespace mln
# endif // ! MLN_WO_GLOBAL_VARS
snake_generic_t::snake_generic_t()
{
}
template <typename F>
inline
......
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -90,7 +91,7 @@ namespace mln
# ifndef MLN_INCLUDE_ONLY
const snake_vert_t snake_vert;
const snake_vert_t snake_vert = snake_vert_t();
template <typename F>
inline
......
......@@ -69,7 +69,7 @@ namespace mln
namespace algebra {
template <unsigned n, typename T> class vec;
template <unsigned d, typename C> struct h_vec;
template <unsigned d, typename C> class h_vec;
}
namespace fun {
......
......@@ -44,7 +44,7 @@ namespace mln
// Forward declaration.
template <typename I, typename S> struct sub_image;
template <typename I, typename S> class sub_image;
namespace internal
......
......@@ -37,7 +37,7 @@ namespace mln
// Forward declarations.
namespace fun { namespace i2v { template <typename T> class array; } }
namespace pw { namespace internal { template <typename F, typename S, typename E> struct image_base; } }
namespace pw { namespace internal { template <typename F, typename S, typename E> class image_base; } }
namespace pw { template <typename F, typename S> class image; }
template <typename I, typename F> struct image_if;
......
......@@ -97,8 +97,8 @@ namespace mln
med.take(input(q));
}
int& row = p.row();
int& col = p.col();
def::coord& row = p.row();
def::coord& col = p.col();
bool fwd = true;
mln_assertion(p.col() == min_col);
......@@ -155,8 +155,8 @@ namespace mln
const unsigned half = win.length() / 2;
point2d p;
int& row = p.row();
int& col = p.col();
def::coord& row = p.row();
def::coord& col = p.col();
accu::stat::median_h<mln_vset(I)> med(input.values());
......
// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
// (LRDE)
// Copyright (C) 2008, 2009, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -71,6 +71,9 @@ namespace mln
{
typedef T_rgb result;
f_hsl_to_rgb_();
template <typename T_hsl>
T_rgb operator()(const T_hsl& hsl) const;
......@@ -94,6 +97,10 @@ namespace mln
/// \}
# endif // !MLN_WO_GLOBAL_VARS
template <typename T_rgb>
f_hsl_to_rgb_<T_rgb>::f_hsl_to_rgb_()
{
}
/// This method implements the conversion from HSL to RGB as described by
/// Max K. Agoston in `Computer Graphics and Geometric Modeling:
......
// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
......@@ -42,6 +42,10 @@ namespace mln
/// Type of literal black.
struct black_t : public Literal<black_t>
{
// This default constructor is needed for compilation with gcc
// 4.6.0, gcc 4.6.1 and Clang.
black_t();
# ifdef MLN_NEW_VALUE_TYPES
operator float() const;
operator double() const;
......@@ -50,17 +54,21 @@ namespace mln
/// Literal black.
extern const black_t& black;
extern const black_t black;
# ifndef MLN_INCLUDE_ONLY
# ifndef MLN_WO_GLOBAL_VARS
const black_t& black = black_t();
const black_t black;
# endif
black_t::black_t()
{
}
# ifdef MLN_NEW_VALUE_TYPES
inline
black_t::operator float() const
......
Supports Markdown
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