
https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008/milena Index: ChangeLog from Alexandre Abraham <abraham@lrde.epita.fr> Fix missing include in gdpoint and void as lvalue in point wise image. * mln/core/concept/gdpoint.hh: Add missing header. * mln/pw/image.hh: Remove void as lvalue. core/concept/gdpoint.hh | 4 ++-- pw/image.hh | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) Index: mln/core/concept/gdpoint.hh --- mln/core/concept/gdpoint.hh (revision 2812) +++ mln/core/concept/gdpoint.hh (working copy) @@ -36,7 +36,7 @@ # include <mln/core/concept/object.hh> # include <mln/core/grids.hh> # include <mln/trait/all.hh> - +# include <mln/value/scalar.hh> namespace mln { Index: mln/pw/image.hh --- mln/pw/image.hh (revision 2812) +++ mln/pw/image.hh (working copy) @@ -132,7 +132,7 @@ typedef mln_result(F) rvalue; /// Return type of read-write access. - typedef void lvalue; // FIXME + typedef rvalue lvalue; /// Constructor without argument. image(); @@ -152,8 +152,8 @@ /// Read-only access of pixel value at point site \p p. mln_result(F) operator()(const mln_psite(S)& p) const; - /// Read-write access is present but disabled. - void operator()(const mln_psite(S)&); + /// Read-write access is present but return a temporary value. + mln_result(F) operator()(const mln_psite(S)&); }; } // end of namespace mln::pw @@ -267,10 +267,11 @@ template <typename F, typename S> inline - void - image<F,S>::operator()(const mln_psite(S)&) + mln_result(F) + image<F,S>::operator()(const mln_psite(S)& p) { - mln_invariant(0); // FIXME: Turn into a compile-time error... + mln_precondition(this->data_->pset_.has(p)); + return this->data_->f_(p); } } // end of namespace mln::pw