[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Return references in LayoutBase
From: |
Richard Guenther |
Subject: |
[PATCH] Return references in LayoutBase |
Date: |
Wed, 14 Jan 2004 20:00:01 +0100 (CET) |
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 <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
- [PATCH] Return references in LayoutBase,
Richard Guenther <=