576: Let neighborhood() return a const reference instead of a copy.

https://svn.lrde.epita.fr/svn/oln/trunk/olena Index: ChangeLog from Roland Levillain <roland@lrde.epita.fr> Let neighborhood() return a const reference instead of a copy. * oln/automatic/image_having_neighborhood.hh (impl_neighborhood) * oln/core/abstract/image/neighborhood/hierarchy.hh (image_having_neighborhood::neighborhood): Return a const reference instead of a copy. automatic/image_having_neighborhood.hh | 2 +- core/abstract/image/neighborhood/hierarchy.hh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Index: oln/automatic/image_having_neighborhood.hh --- oln/automatic/image_having_neighborhood.hh (revision 575) +++ oln/automatic/image_having_neighborhood.hh (working copy) @@ -57,7 +57,7 @@ public: /// Accessor delegation. - neighborhood_t impl_neighborhood() const + const neighborhood_t& impl_neighborhood() const { return this->exact().delegate().neighborhood(); } Index: oln/core/abstract/image/neighborhood/hierarchy.hh --- oln/core/abstract/image/neighborhood/hierarchy.hh (revision 575) +++ oln/core/abstract/image/neighborhood/hierarchy.hh (working copy) @@ -74,7 +74,7 @@ // stc_virtual_typedef(bkd_niter); }; - neighborhood_t neighborhood() const + const neighborhood_t& neighborhood() const { return this->topo().neighborhood(); }
participants (1)
-
Roland Levillain