* mln/morpho/line_gradient.hh (mln::morpho::line_gradient): Here.
---
milena/ChangeLog | 6 ++++++
milena/mln/morpho/line_gradient.hh | 9 +++------
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 329f88a..e225c93 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,11 @@
2008-09-17 Roland Levillain <roland(a)lrde.epita.fr>
+ Improve the handling of a possibly unused variable in line_gradient.
+
+ * mln/morpho/line_gradient.hh (mln::morpho::line_gradient): Here.
+
+2008-09-17 Roland Levillain <roland(a)lrde.epita.fr>
+
Fix a bug in morpho::line_gradient.
* mln/morpho/line_gradient.hh (mln::morpho::line_gradient):
diff --git a/milena/mln/morpho/line_gradient.hh b/milena/mln/morpho/line_gradient.hh
index c802d9a..f9b32b2 100644
--- a/milena/mln/morpho/line_gradient.hh
+++ b/milena/mln/morpho/line_gradient.hh
@@ -100,13 +100,10 @@ namespace mln
for_all (q)
if (ima.domain().has(q))
{
- // Avoid a warning about an undefined variable when the
- // NDEBUG is not defined.
-#ifdef NDEBUG
- g.add_edge(points[p], points[q]);
-#else // !NDEBUG
util::edge_id id = g.add_edge(points[p], points[q]);
-#endif //!NDEBUG
+ // Avoid a warning about an undefined variable when NDEBUG
+ // is not defined.
+ (void) id;
// The computed value is a norm of the gradient between P and Q.
edge_values.push_back(math::abs(ima(p) - ima(q)));
mln_assertion(id != mln_max(util::edge_id::equiv));
--
1.6.0.1
Show replies by date