2453: Fix comparison operators on topo::face<D> and topo::n_face<N, D>.

* mln/topo/face.hh (operator==(const face<D>&, const face<D>&)) (operator< (const face<D>&, const face<D>&)): * mln/topo/n_face.hh (operator==(const n_face<N, D>&, const n_face<N, D>&)) (operator< (const n_face<N, D>&, const n_face<N, D>&)): Fix preconditions. Fix and catch up with the current interface of mln::topo::face<D>. --- milena/ChangeLog | 13 +++++++++++++ milena/mln/topo/face.hh | 12 +++++------- milena/mln/topo/n_face.hh | 8 ++++---- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index 5cefbda..e6ca427 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,18 @@ 2008-10-01 Roland Levillain <roland@lrde.epita.fr> + Fix comparison operators on topo::face<D> and topo::n_face<N, D>. + + * mln/topo/face.hh + (operator==(const face<D>&, const face<D>&)) + (operator< (const face<D>&, const face<D>&)): + * mln/topo/n_face.hh + (operator==(const n_face<N, D>&, const n_face<N, D>&)) + (operator< (const n_face<N, D>&, const n_face<N, D>&)): + Fix preconditions. + Fix and catch up with the current interface of mln::topo::face<D>. + +2008-10-01 Roland Levillain <roland@lrde.epita.fr> + Fix exact type of mln::internal::p_complex_piter_base_ * mln/core/internal/p_complex_piter_base.hh diff --git a/milena/mln/topo/face.hh b/milena/mln/topo/face.hh index 00d6049..686c50a 100644 --- a/milena/mln/topo/face.hh +++ b/milena/mln/topo/face.hh @@ -380,10 +380,8 @@ namespace mln operator==(const face<D>& lhs, const face<D>& rhs) { // Ensure LHS and RHS belong to the same complex. - mln_precondition(&lhs.face.cplx() == &rhs.face.cplx()); - return - lhs.face().n() == rhs.face().n() && - lhs.face().id() == rhs.face().id(); + mln_precondition(lhs.cplx() == rhs.cplx()); + return lhs.n() == rhs.n() && lhs.face_id() == rhs.face_id(); } template <unsigned D> @@ -392,10 +390,10 @@ namespace mln operator< (const face<D>& lhs, const face<D>& rhs) { // Ensure LHS and RHS belong to the same complex. - mln_precondition(&lhs.face.cplx() == &rhs.face.cplx()); + mln_precondition(lhs.cplx() == rhs.cplx()); // Ensure LHS and RHS have the same dimension. - mln_precondition(lhs.face().n() == rhs.face().n()); - return lhs.face().id() < rhs.face().id(); + mln_precondition(lhs.n() == rhs.n()); + return lhs.face_id() < rhs.face_id(); } diff --git a/milena/mln/topo/n_face.hh b/milena/mln/topo/n_face.hh index fddf568..343f7b0 100644 --- a/milena/mln/topo/n_face.hh +++ b/milena/mln/topo/n_face.hh @@ -239,8 +239,8 @@ namespace mln operator==(const n_face<N, D>& lhs, const n_face<N, D>& rhs) { // Ensure LHS and RHS belong to the same complex. - mln_precondition(&lhs.face.cplx() == &rhs.face.cplx()); - return lhs.face().id() == rhs.face().id(); + mln_precondition(lhs.cplx() == rhs.cplx()); + return lhs.face_id() == rhs.face_id(); } template <unsigned N, unsigned D> @@ -249,8 +249,8 @@ namespace mln operator< (const n_face<N, D>& lhs, const n_face<N, D>& rhs) { // Ensure LHS and RHS belong to the same complex. - mln_precondition(&lhs.face.cplx() == &rhs.face.cplx()); - return lhs.face().id() < rhs.face().id(); + mln_precondition(lhs.cplx() == rhs.cplx()); + return lhs.face_id() < rhs.face_id(); } -- 1.6.0.1
participants (1)
-
Roland Levillain