freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Return references in LayoutBase


From: Jeffrey D. Oldham
Subject: Re: [PATCH] Return references in LayoutBase
Date: Thu, 15 Jan 2004 13:16:11 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

Richard Guenther wrote:
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?


Yes.

Richard.


2004Jan14  Richard Guenther <address@hidden>

        * 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


--
Jeffrey D. Oldham
address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]