olena: olena-2.0-657-ga412a54 Fix a bug in the reimplementation of Trimesh algorithms.

* apps/mesh-segm-skel/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/misc.hh | 15 +++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index 54919d0..4ba89c2 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,3 +1,13 @@ +2010-05-10 Roland Levillain <roland@lrde.epita.fr> + + Fix a bug in the reimplementation of Trimesh algorithms. + + * apps/mesh-segm-skel/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@lrde.epita.fr> Improve topo::skeleton::breadth_first_thinning. diff --git a/milena/apps/mesh-segm-skel/misc.hh b/milena/apps/mesh-segm-skel/misc.hh index 60c009e..325bd8f 100644 --- a/milena/apps/mesh-segm-skel/misc.hh +++ b/milena/apps/mesh-segm-skel/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 Olena. // @@ -622,10 +622,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.7.10.4
participants (1)
-
Roland Levillain