* mln/fun/i2v/array.hh (operator() const): Return a reference instead of a copy.
---
milena/ChangeLog | 6 ++++++
milena/mln/fun/i2v/array.hh | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 2649954..d1e9441 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,11 @@
2008-10-27 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Fix return type of i2v::array::operator().
+
+ * mln/fun/i2v/array.hh (operator() const): Return a reference instead of a copy.
+
+2008-10-27 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Add box::center() and a new overload of box::enlarge().
* mln/core/site_set/box.hh:
diff --git a/milena/mln/fun/i2v/array.hh b/milena/mln/fun/i2v/array.hh
index 219be8a..a791ec6 100644
--- a/milena/mln/fun/i2v/array.hh
+++ b/milena/mln/fun/i2v/array.hh
@@ -60,7 +60,7 @@ namespace mln
void resize(unsigned n);
unsigned size() const;
- T operator()(unsigned i) const;
+ const T& operator()(unsigned i) const;
T& operator()(unsigned i);
private:
@@ -111,7 +111,7 @@ namespace mln
template <typename T>
inline
- T
+ const T&
array<T>::operator()(unsigned i) const
{
mln_precondition(i < v_.size());
--
1.5.6.5