freepooma-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Minor cleanups


From: Jeffrey D. Oldham
Subject: Re: [PATCH] Minor cleanups
Date: Tue, 01 Jun 2004 12:23:19 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 Debian/1.5-3

Richard Guenther wrote:

Hi!

This patch changes the comp(int) methods of Array/Field to not pass by const reference, it also removes an unused specialization of ComponentView.

Compiled and tested on ia32-linux, ok?


Yes, please commit this improvement.

Richard.

2004May31  Richard Guenther <address@hidden>

    * src/Array/Array.h: remove ComponentView<int, > specialization,
    do not pass i1 by const reference for comp() method.
src/Field/Field.h: do not pass i1 by const reference for comp() method.

------------------------------------------------------------------------

===== src/Array/Array.h 1.12 vs edited =====
--- 1.12/r2/src/Array/Array.h   2004-05-31 15:47:13 +02:00
+++ edited/src/Array/Array.h    2004-05-31 16:16:31 +02:00
@@ -1288,12 +1288,6 @@
 * Changes to ComponentView should also be made to AltComponentView.
 */

-template<int Dim, class T, class EngineTag>
-struct ComponentView<int, Array<Dim, T, EngineTag> >
-{
-  typedef int Type_t;
-};
-
template<class Components, int Dim, class T, class EngineTag>
struct ComponentView<Components, Array<Dim, T, EngineTag> >
{
@@ -1978,7 +1972,7 @@
  /// that returns a reference or proxy to the component.
  //@{
  inline typename AltComponentView<Loc<1>, This_t>::Type_t
-  comp(const int &i1) const
+  comp(int i1) const
    {
      return ComponentView<Loc<1>, This_t>::make(*this, Loc<1>(i1));
    }
===== src/Field/Field.h 1.19 vs edited =====
--- 1.19/r2/src/Field/Field.h   2004-05-31 15:47:13 +02:00
+++ edited/src/Field/Field.h    2004-05-31 16:14:56 +02:00
@@ -1414,7 +1414,7 @@
  //@{

  inline typename ComponentView<Loc<1>, This_t>::Type_t
-  comp(const int &i1) const
+  comp(int i1) const
  {
    return ComponentView<Loc<1>, This_t>::make(*this, Loc<1>(i1));
  }


--
Jeffrey D. Oldham
address@hidden


reply via email to

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