* mln/core/complex.hh (mln::complex<D>::add_face): Use
`if (!HAS_NDEBUG)' instead of `#ifndef NDEBUG'.
---
milena/ChangeLog | 7 +++++++
milena/mln/core/complex.hh | 17 +++++++----------
2 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 44e4772..5ace73e 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -74,6 +74,13 @@
2008-09-23 Roland Levillain <roland(a)lrde.epita.fr>
+ Have the compiler check more code, even in NDEBUG mode.
+
+ * mln/core/complex.hh (mln::complex<D>::add_face): Use
+ `if (!HAS_NDEBUG)' instead of `#ifndef NDEBUG'.
+
+2008-09-23 Roland Levillain <roland(a)lrde.epita.fr>
+
Make use of the new semantics of complexes in tests.
* tests/core/image/complex_image.cc: Update.
diff --git a/milena/mln/core/complex.hh b/milena/mln/core/complex.hh
index d1e5bad..32197f4 100644
--- a/milena/mln/core/complex.hh
+++ b/milena/mln/core/complex.hh
@@ -420,16 +420,13 @@ namespace mln
typedef typename std::vector< face_handle<N, D> >::const_iterator
iter_t;
// Ensure ADJACENT_FACES are already part of the complex.
- /* FIXME: We need additional macros in mln/core/contract.hh for
- big blocks of preconditions like this one. */
-# ifndef NDEBUG
- for (iter_t a = adjacent_faces.faces().begin();
- a != adjacent_faces.faces().end(); ++a)
- {
- mln_precondition(&a->cplx() == this);
- mln_precondition(a->is_valid());
- }
-# endif // !NDEBUG
+ if (!HAS_NDEBUG)
+ for (iter_t a = adjacent_faces.faces().begin();
+ a != adjacent_faces.faces().end(); ++a)
+ {
+ mln_precondition(&a->cplx() == this);
+ mln_precondition(a->is_valid());
+ }
face<N + 1, D> f;
/* FIXME: This is not thread-proof (these two lines should
--
1.6.0.1