
* mln/core/internal/complex_iter_base.hh: (mln::internal::complex_iter_base_<F, E>::complex_iter_base_): Remove copy ctor. (mln::internal::complex_iter_base_<F, E>::operator=): Remove assignment operator. (mln::internal::complex_iter_base_<F, E>::set_cplx): New accessor. --- milena/ChangeLog | 12 +++++++++ milena/mln/core/internal/complex_iter_base.hh | 31 +++++++----------------- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index 32c9a60..005bbdc 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -41,6 +41,18 @@ 2008-09-24 Roland Levillain <roland@lrde.epita.fr> + Simplify mln::internal::complex_iter_base_. + + * mln/core/internal/complex_iter_base.hh: + (mln::internal::complex_iter_base_<F, E>::complex_iter_base_): + Remove copy ctor. + (mln::internal::complex_iter_base_<F, E>::operator=): + Remove assignment operator. + (mln::internal::complex_iter_base_<F, E>::set_cplx): + New accessor. + +2008-09-24 Roland Levillain <roland@lrde.epita.fr> + * tests/core/image/complex_image.cc: Exercise iterators on p_faces. 2008-09-24 Roland Levillain <roland@lrde.epita.fr> diff --git a/milena/mln/core/internal/complex_iter_base.hh b/milena/mln/core/internal/complex_iter_base.hh index a2462ea..e2c747a 100644 --- a/milena/mln/core/internal/complex_iter_base.hh +++ b/milena/mln/core/internal/complex_iter_base.hh @@ -65,12 +65,14 @@ namespace mln milena/tests/complex_image.cc. */ complex_iter_base_(); complex_iter_base_(complex_type& c); - complex_iter_base_(const self_& rhs); - self_& operator= (const self_& rhs); /// \} /// Manipulation. /// \{ + /// Change the target complex. + // FIXME: Same comment as the ctor above. + void set_cplx(complex_type& c); + /// Test if the iterator is valid. bool is_valid() const; /// Invalidate the iterator. @@ -100,15 +102,10 @@ namespace mln std::ostream& operator<<(std::ostream& ostr, const complex_iter_base_<F, E>& p); - } // end of mln::internal - # ifndef MLN_INCLUDE_ONLY - namespace internal - { - template <typename F, typename E> inline complex_iter_base_<F, E>::complex_iter_base_() @@ -133,22 +130,12 @@ namespace mln template <typename F, typename E> inline - complex_iter_base_<F, E>::complex_iter_base_(const complex_iter_base_<F, E>& rhs) - : face_(rhs.face_) - { - // Ensure F and E are compatible. - mlc_equal(F, typename E::face)::check(); - } - - template <typename F, typename E> - inline - complex_iter_base_<F, E>& - complex_iter_base_<F, E>::operator=(const complex_iter_base_<F, E>& rhs) + void + complex_iter_base_<F, E>::set_cplx(complex_type& c) { - if (&rhs == this) - return *this; - face_ = rhs.face_; - return *this; + face_.set_cplx(c); + // Invalidate face_. + invalidate(); } template <typename F, typename E> -- 1.6.0.1