[PATCH] Return references in LayoutBase

Richard Guenther rguenth at tat.physik.uni-tuebingen.de
Wed Jan 14 19:00:01 UTC 2004


Hi!

This patch makes internalGuards(), externalGuards() and blocks() methods
of LayoutBase return const references rather than copies.

Tested with no regressions on MPI intel linux.

Ok?

Richard.


2004Jan14  Richard Guenther <richard.guenther at uni-tuebingen.de>

	* src/Layout/LayoutBase.h: return const references in
	guard and block accessors.

===== LayoutBase.h 1.10 vs edited =====
--- 1.10/r2/src/Layout/LayoutBase.h	Wed Jan  7 12:17:55 2004
+++ edited/LayoutBase.h	Tue Jan 13 23:37:13 2004
@@ -204,12 +204,12 @@
     return all_m[i]->allocated();
   }

-  inline GuardLayers_t internalGuards() const
+  inline const GuardLayers_t& internalGuards() const
   {
     return internalGuards_m;
   }

-  inline GuardLayers_t externalGuards() const
+  inline const GuardLayers_t& externalGuards() const
   {
     return externalGuards_m;
   }
@@ -243,7 +243,7 @@

   /// number of blocks along each axis.

-  inline Loc<Dim> blocks() const  { return blocks_m; }
+  inline const Loc<Dim>& blocks() const  { return blocks_m; }

   ///@name Guard-cell related functions.
   /// Iterators into the fill list. These are MultiPatch's interface to



More information about the pooma-dev mailing list