* 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/hsi_to_rgb.hh,
* mln/fun/v2v/rgb_to_hsi.hh,
* mln/fun/v2v/rgb_to_hsl.hh,
* mln/literal/black.hh,
* mln/literal/colors.hh,
* mln/literal/grays.hh,
* mln/literal/max.hh,
* mln/literal/min.hh,
* mln/literal/white.hh: Add missing inline keyword and
MLN_WO_GLOBAL_VARS guards.
---
milena/ChangeLog | 26 ++++++++++++++++++++
milena/mln/canvas/browsing/backdiagonal2d.hh | 1 +
milena/mln/canvas/browsing/breadth_first_search.hh | 9 +++++-
milena/mln/canvas/browsing/depth_first_search.hh | 1 +
milena/mln/canvas/browsing/diagonal2d.hh | 1 +
.../canvas/browsing/dir_struct_elt_incr_update.hh | 5 ++++
milena/mln/canvas/browsing/directional.hh | 1 +
milena/mln/canvas/browsing/fwd.hh | 6 ++++
milena/mln/canvas/browsing/hyper_directional.hh | 6 ++++
milena/mln/canvas/browsing/snake_fwd.hh | 1 +
milena/mln/canvas/browsing/snake_generic.hh | 1 +
milena/mln/canvas/browsing/snake_vert.hh | 4 ++-
milena/mln/fun/v2v/hsi_to_rgb.hh | 4 ++-
milena/mln/fun/v2v/rgb_to_hsi.hh | 6 ++++-
milena/mln/fun/v2v/rgb_to_hsl.hh | 7 ++++-
milena/mln/literal/black.hh | 1 +
milena/mln/literal/colors.hh | 14 ++++++++++
milena/mln/literal/max.hh | 6 ++++-
milena/mln/literal/min.hh | 5 +++-
milena/mln/literal/white.hh | 1 +
20 files changed, 97 insertions(+), 9 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 555ea72..b51d355 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,31 @@
2011-11-23 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Fix compilation with multiple files.
+
+ * 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/hsi_to_rgb.hh,
+ * mln/fun/v2v/rgb_to_hsi.hh,
+ * mln/fun/v2v/rgb_to_hsl.hh,
+ * mln/literal/black.hh,
+ * mln/literal/colors.hh,
+ * mln/literal/grays.hh,
+ * mln/literal/max.hh,
+ * mln/literal/min.hh,
+ * mln/literal/white.hh: Add missing inline keyword and
+ MLN_WO_GLOBAL_VARS guards.
+
+2011-11-23 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Fix more compilation issues with g++ 4.6.1 and clang++.
* mln/canvas/browsing/snake_vert.hh,
diff --git a/milena/mln/canvas/browsing/backdiagonal2d.hh
b/milena/mln/canvas/browsing/backdiagonal2d.hh
index 0ec455e..adfdecb 100644
--- a/milena/mln/canvas/browsing/backdiagonal2d.hh
+++ b/milena/mln/canvas/browsing/backdiagonal2d.hh
@@ -102,6 +102,7 @@ namespace mln
# endif // ! MLN_WO_GLOBAL_VARS
+ inline
backdiagonal2d_t::backdiagonal2d_t()
{
}
diff --git a/milena/mln/canvas/browsing/breadth_first_search.hh
b/milena/mln/canvas/browsing/breadth_first_search.hh
index a637114..a7a8bce 100644
--- a/milena/mln/canvas/browsing/breadth_first_search.hh
+++ b/milena/mln/canvas/browsing/breadth_first_search.hh
@@ -91,12 +91,17 @@ namespace mln
# ifndef MLN_INCLUDE_ONLY
- const breadth_first_search_t breadth_first_search;
-
+ inline
breadth_first_search_t::breadth_first_search_t()
{
}
+# ifndef MLN_WO_GLOBAL_VARS
+
+ const breadth_first_search_t breadth_first_search;
+
+# endif // ! MLN_WO_GLOBAL_VARS
+
# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::canvas::browsing
diff --git a/milena/mln/canvas/browsing/depth_first_search.hh
b/milena/mln/canvas/browsing/depth_first_search.hh
index ecb2c08..5aacdea 100644
--- a/milena/mln/canvas/browsing/depth_first_search.hh
+++ b/milena/mln/canvas/browsing/depth_first_search.hh
@@ -97,6 +97,7 @@ namespace mln
# endif // ! MLN_WO_GLOBAL_VARS
+ inline
depth_first_search_t::depth_first_search_t()
{
}
diff --git a/milena/mln/canvas/browsing/diagonal2d.hh
b/milena/mln/canvas/browsing/diagonal2d.hh
index 246f930..0dc2cf7 100644
--- a/milena/mln/canvas/browsing/diagonal2d.hh
+++ b/milena/mln/canvas/browsing/diagonal2d.hh
@@ -99,6 +99,7 @@ namespace mln
# endif // ! MLN_WO_GLOBAL_VARS
+ inline
diagonal2d_t::diagonal2d_t()
{
}
diff --git a/milena/mln/canvas/browsing/dir_struct_elt_incr_update.hh
b/milena/mln/canvas/browsing/dir_struct_elt_incr_update.hh
index 0037229..6e6f3a1 100644
--- a/milena/mln/canvas/browsing/dir_struct_elt_incr_update.hh
+++ b/milena/mln/canvas/browsing/dir_struct_elt_incr_update.hh
@@ -98,8 +98,13 @@ namespace mln
# ifndef MLN_INCLUDE_ONLY
+# ifndef MLN_WO_GLOBAL_VARS
+
const dir_struct_elt_incr_update_t dir_struct_elt_incr_update;
+# endif // ! MLN_WO_GLOBAL_VARS
+
+ inline
dir_struct_elt_incr_update_t::dir_struct_elt_incr_update_t()
{
}
diff --git a/milena/mln/canvas/browsing/directional.hh
b/milena/mln/canvas/browsing/directional.hh
index 8931cad..03b9956 100644
--- a/milena/mln/canvas/browsing/directional.hh
+++ b/milena/mln/canvas/browsing/directional.hh
@@ -107,6 +107,7 @@ namespace mln
# endif // ! MLN_WO_GLOBAL_VARS
+ inline
directional_t::directional_t()
{
}
diff --git a/milena/mln/canvas/browsing/fwd.hh b/milena/mln/canvas/browsing/fwd.hh
index 86c9bf8..63204bf 100644
--- a/milena/mln/canvas/browsing/fwd.hh
+++ b/milena/mln/canvas/browsing/fwd.hh
@@ -84,8 +84,14 @@ namespace mln
# ifndef MLN_INCLUDE_ONLY
+# ifndef MLN_WO_GLOBAL_VARS
+
const fwd_t fwd;
+# endif // ! MLN_WO_GLOBAL_VARS
+
+
+ inline
fwd_t::fwd_t()
{
}
diff --git a/milena/mln/canvas/browsing/hyper_directional.hh
b/milena/mln/canvas/browsing/hyper_directional.hh
index 65bb794..84e8e9c 100644
--- a/milena/mln/canvas/browsing/hyper_directional.hh
+++ b/milena/mln/canvas/browsing/hyper_directional.hh
@@ -86,8 +86,14 @@ namespace mln
# ifndef MLN_INCLUDE_ONLY
+# ifndef MLN_WO_GLOBAL_VARS
+
const hyper_directional_t hyper_directional;
+# endif // ! MLN_WO_GLOBAL_VARS
+
+
+ inline
hyper_directional_t::hyper_directional_t()
{
}
diff --git a/milena/mln/canvas/browsing/snake_fwd.hh
b/milena/mln/canvas/browsing/snake_fwd.hh
index 06b72df..855723e 100644
--- a/milena/mln/canvas/browsing/snake_fwd.hh
+++ b/milena/mln/canvas/browsing/snake_fwd.hh
@@ -101,6 +101,7 @@ namespace mln
# endif // ! MLN_WO_GLOBAL_VARS
+ inline
snake_fwd_t::snake_fwd_t()
{
}
diff --git a/milena/mln/canvas/browsing/snake_generic.hh
b/milena/mln/canvas/browsing/snake_generic.hh
index af9f799..b0ba22e 100644
--- a/milena/mln/canvas/browsing/snake_generic.hh
+++ b/milena/mln/canvas/browsing/snake_generic.hh
@@ -95,6 +95,7 @@ namespace mln
# endif // ! MLN_WO_GLOBAL_VARS
+ inline
snake_generic_t::snake_generic_t()
{
}
diff --git a/milena/mln/canvas/browsing/snake_vert.hh
b/milena/mln/canvas/browsing/snake_vert.hh
index c984192..f4614e6 100644
--- a/milena/mln/canvas/browsing/snake_vert.hh
+++ b/milena/mln/canvas/browsing/snake_vert.hh
@@ -95,7 +95,9 @@ namespace mln
# ifndef MLN_INCLUDE_ONLY
- const snake_vert_t snake_vert = snake_vert_t();
+# ifndef MLN_WO_GLOBAL_VARS
+
+ const snake_vert_t snake_vert;
# endif // ! MLN_WO_GLOBAL_VARS
diff --git a/milena/mln/fun/v2v/hsi_to_rgb.hh b/milena/mln/fun/v2v/hsi_to_rgb.hh
index 40201db..0011e2b 100644
--- a/milena/mln/fun/v2v/hsi_to_rgb.hh
+++ b/milena/mln/fun/v2v/hsi_to_rgb.hh
@@ -72,6 +72,8 @@ namespace mln
# ifndef MLN_INCLUDE_ONLY
+# ifndef MLN_WO_GLOBAL_VARS
+
/// Global variable.
/// \{
f_hsi_to_rgb_3x8_t f_hsi_to_rgb_3x8;
@@ -79,12 +81,12 @@ namespace mln
# endif // ! MLN_WO_GLOBAL_VARS
-
template <typename T_rgb>
f_hsi_to_rgb_<T_rgb>::f_hsi_to_rgb_()
{
}
+
template <typename T_rgb>
template <typename T_hsi>
inline
diff --git a/milena/mln/fun/v2v/rgb_to_hsi.hh b/milena/mln/fun/v2v/rgb_to_hsi.hh
index 7001813..12e2a9d 100644
--- a/milena/mln/fun/v2v/rgb_to_hsi.hh
+++ b/milena/mln/fun/v2v/rgb_to_hsi.hh
@@ -1,4 +1,5 @@
-// 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.
//
@@ -63,11 +64,14 @@ namespace mln
# ifndef MLN_INCLUDE_ONLY
+# ifndef MLN_WO_GLOBAL_VARS
+
/// Global variables.
/// \{
f_rgb_to_hsi_f_t f_rgb_to_hsi_f;
/// \}
+# endif // ! MLN_WO_GLOBAL_VARS
template <typename T_hsi>
diff --git a/milena/mln/fun/v2v/rgb_to_hsl.hh b/milena/mln/fun/v2v/rgb_to_hsl.hh
index 0f63ccd..b28036c 100644
--- a/milena/mln/fun/v2v/rgb_to_hsl.hh
+++ b/milena/mln/fun/v2v/rgb_to_hsl.hh
@@ -1,5 +1,5 @@
-// 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.
//
@@ -72,11 +72,14 @@ namespace mln
# ifndef MLN_INCLUDE_ONLY
+# ifndef MLN_WO_GLOBAL_VARS
+
/// Global variables.
/// \{
f_rgb_to_hsl_f_t f_rgb_to_hsl_f;
/// \}
+# endif // ! MLN_WO_GLOBAL_VARS
template <typename T_hsl>
f_rgb_to_hsl_f_t<T_hsl>::f_rgb_to_hsl_f_t()
diff --git a/milena/mln/literal/black.hh b/milena/mln/literal/black.hh
index 6ffbe33..3b0bd2f 100644
--- a/milena/mln/literal/black.hh
+++ b/milena/mln/literal/black.hh
@@ -65,6 +65,7 @@ namespace mln
# endif
+ inline
black_t::black_t()
{
}
diff --git a/milena/mln/literal/colors.hh b/milena/mln/literal/colors.hh
index 52c05d0..e70d843 100644
--- a/milena/mln/literal/colors.hh
+++ b/milena/mln/literal/colors.hh
@@ -195,58 +195,72 @@ namespace mln
# ifndef MLN_INCLUDE_ONLY
+ inline
red_t::red_t()
{
}
+ inline
green_t::green_t()
{
}
+ inline
blue_t::blue_t()
{
}
+ inline
brown_t::brown_t()
{
}
+ inline
lime_t::lime_t()
{
}
+ inline
orange_t::orange_t()
{
}
+ inline
pink_t::pink_t()
{
}
+ inline
purple_t::purple_t()
{
}
+ inline
teal_t::teal_t()
{
}
+ inline
violet_t::violet_t()
{
}
+ inline
cyan_t::cyan_t()
{
}
+ inline
magenta_t::magenta_t()
{
}
+ inline
yellow_t::yellow_t()
{
}
+ inline
olive_t::olive_t()
{
}
diff --git a/milena/mln/literal/max.hh b/milena/mln/literal/max.hh
index 630584c..1085750 100644
--- a/milena/mln/literal/max.hh
+++ b/milena/mln/literal/max.hh
@@ -72,7 +72,11 @@ namespace mln
}
- const max_t& max = max_t();
+# ifndef MLN_WO_GLOBAL_VARS
+
+ const max_t max;
+
+# endif // ! MLN_WO_GLOBAL_VARS
# endif // ! MLN_INCLUDE_ONLY
diff --git a/milena/mln/literal/min.hh b/milena/mln/literal/min.hh
index eb1abc8..3ac5014 100644
--- a/milena/mln/literal/min.hh
+++ b/milena/mln/literal/min.hh
@@ -70,8 +70,11 @@ namespace mln
return mln_min(T);
}
+# ifndef MLN_WO_GLOBAL_VARS
- const min_t& min = min_t();
+ const min_t min;
+
+# endif // ! MLN_WO_GLOBAL_VARS
# endif // ! MLN_INCLUDE_ONLY
diff --git a/milena/mln/literal/white.hh b/milena/mln/literal/white.hh
index 620a73a..7f7a80b 100644
--- a/milena/mln/literal/white.hh
+++ b/milena/mln/literal/white.hh
@@ -65,6 +65,7 @@ namespace mln
# endif
+ inline
white_t::white_t()
{
}
--
1.7.2.5