freepooma-devel
[Top][All Lists]
Advanced

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

[PATCH] Minor cleanups


From: Richard Guenther
Subject: [PATCH] Minor cleanups
Date: Mon, 31 May 2004 17:20:16 +0200
User-agent: Mozilla Thunderbird 0.6 (X11/20040528)

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?

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));
   }

reply via email to

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