* mln/topo/complex.hh
(mln::complex<D>::add_face(const n_faces_set<N, D>&)):
Don't compare pointers-on-complex in precondition, compare the
complexes themselves.
Aesthetic changes.
---
milena/ChangeLog | 10 ++++++++++
milena/mln/topo/complex.hh | 8 +++-----
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index f67a0d3..43214ce 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,15 @@
2008-10-16 Roland Levillain <roland(a)lrde.epita.fr>
+ Fix a precondition in complex construction (add_face).
+
+ * mln/topo/complex.hh
+ (mln::complex<D>::add_face(const n_faces_set<N, D>&)):
+ Don't compare pointers-on-complex in precondition, compare the
+ complexes themselves.
+ Aesthetic changes.
+
+2008-10-16 Roland Levillain <roland(a)lrde.epita.fr>
+
* mln/topo/complex.hh (mln::complex<D>::addr): New accessor.
2008-10-16 Roland Levillain <roland(a)lrde.epita.fr>
diff --git a/milena/mln/topo/complex.hh b/milena/mln/topo/complex.hh
index f4e1499..e6330e2 100644
--- a/milena/mln/topo/complex.hh
+++ b/milena/mln/topo/complex.hh
@@ -211,8 +211,7 @@ namespace mln
///
/// \pre \p N must be lower or equal to \p D.
template <unsigned N>
- void connect_(const n_face<N, D>& f1,
- const n_face<N + 1, D>& f2);
+ void connect_(const n_face<N, D>& f1, const n_face<N + 1, D>&
f2);
};
@@ -502,7 +501,7 @@ namespace mln
for (iter_t a = adjacent_faces.faces().begin();
a != adjacent_faces.faces().end(); ++a)
{
- mln_precondition(&a->cplx() == this);
+ mln_precondition(a->cplx() == *this);
mln_precondition(a->is_valid());
}
@@ -630,8 +629,7 @@ namespace mln
template <unsigned N>
inline
void
- complex<D>::connect_(const n_face<N, D>& f1,
- const n_face<N + 1, D>& f2)
+ complex<D>::connect_(const n_face<N, D>& f1, const n_face<N + 1,
D>& f2)
{
// Ensure N is compatible with D.
metal::bool_< N <= D >::check();
--
1.6.0.1
Show replies by date