* apps/mesh-segm-skel/trimesh/misc.hh (mln::geom::mesh_curvature):
Always call algebra::ldlt_decomp, even when NDEBUG is defined.
Typo.
Avoid a warning about an undefined variable when NDEBUG is not
defined.
---
milena/ChangeLog | 10 ++++++++++
milena/apps/mesh-segm-skel/trimesh/misc.hh | 15 +++++++++------
2 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index f1c1386..2d28537 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,13 @@
+2010-05-10 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Fix a bug in the reimplementation of Trimesh algorithms.
+
+ * apps/mesh-segm-skel/trimesh/misc.hh (mln::geom::mesh_curvature):
+ Always call algebra::ldlt_decomp, even when NDEBUG is defined.
+ Typo.
+ Avoid a warning about an undefined variable when NDEBUG is not
+ defined.
+
2010-05-04 Roland Levillain <roland(a)lrde.epita.fr>
Improve topo::skeleton::breadth_first_thinning.
diff --git a/milena/apps/mesh-segm-skel/trimesh/misc.hh
b/milena/apps/mesh-segm-skel/trimesh/misc.hh
index 5084632..79eea14 100644
--- a/milena/apps/mesh-segm-skel/trimesh/misc.hh
+++ b/milena/apps/mesh-segm-skel/trimesh/misc.hh
@@ -1,5 +1,5 @@
-// 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 the Milena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -623,10 +623,13 @@ namespace mln
// Least squares solution.
vec3f diag;
-#ifndef NDEBUG
- bool ldlt_decomp_sucess_p = algebra::ldlt_decomp(w, diag);
-#endif // ! NDEBUG
- mln_assertion(ldlt_decomp_sucess_p);
+ // Note that algebra::ldlt_decomp has side effects on its
+ // arguments; this call is not ``just an assertion''.
+ bool ldlt_decomp_success_p = algebra::ldlt_decomp(w, diag);
+ mln_assertion(ldlt_decomp_success_p);
+ // Avoid a warning about an undefined variable when NDEBUG
+ // is not defined.
+ (void) ldlt_decomp_success_p;
algebra::ldlt_solve(w, diag, m, m);
// Push it back out to the vertices
--
1.5.6.5