From 0bb012d0c252218b05229c0b530d28819444edcf Mon Sep 17 00:00:00 2001
From: henry <Henry Weller h.weller@opencfd.co.uk>
Date: Tue, 23 Jun 2009 20:43:51 +0100
Subject: [PATCH] Corrected handling of loop macros and removed those for
 PtrList.

---
 .../containers/Lists/List/ListLoopM.H         | 16 ++++--
 .../containers/Lists/List/undefListLoopM.H    | 46 ---------------
 .../containers/Lists/PtrList/PtrList.C        |  1 -
 .../containers/Lists/PtrList/PtrListLoopM.H   | 56 -------------------
 .../containers/Lists/UPtrList/UPtrList.C      |  1 -
 .../symmTransformField/symmTransformField.C   |  2 +-
 wmake/rules/linux64Gcc/c++Opt                 |  2 +-
 7 files changed, 12 insertions(+), 112 deletions(-)
 delete mode 100644 src/OpenFOAM/containers/Lists/List/undefListLoopM.H
 delete mode 100644 src/OpenFOAM/containers/Lists/PtrList/PtrListLoopM.H

diff --git a/src/OpenFOAM/containers/Lists/List/ListLoopM.H b/src/OpenFOAM/containers/Lists/List/ListLoopM.H
index da90147c64c..48b8c5d17e5 100644
--- a/src/OpenFOAM/containers/Lists/List/ListLoopM.H
+++ b/src/OpenFOAM/containers/Lists/List/ListLoopM.H
@@ -31,8 +31,6 @@ Description
 #ifndef ListLoop_H
 #define ListLoop_H
 
-#include "undefListLoopM.H"
-
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
 #ifdef vectorMachine
@@ -48,8 +46,11 @@ Description
 
 #define List_ELEM(f, fp, i)  (fp[i])
 
-#define List_ACCESS(type, f, fp) type* __restrict__ fp = (f).begin()
-#define List_CONST_ACCESS(type, f, fp) const type* __restrict__ fp = (f).begin()
+#define List_ACCESS(type, f, fp) \
+    type* const __restrict__ fp = (f).begin()
+
+#define List_CONST_ACCESS(type, f, fp) \
+    const type* const __restrict__ fp = (f).begin()
 
 #else
 
@@ -64,8 +65,11 @@ Description
 
 #define List_ELEM(f, fp, i)  (*fp++)
 
-#define List_ACCESS(type, f, fp)  register type* __restrict__ fp = (f).begin()
-#define List_CONST_ACCESS(type, f, fp)  register const type* __restrict__ fp = (f).begin()
+#define List_ACCESS(type, f, fp) \
+    register type* __restrict__ fp = (f).begin()
+
+#define List_CONST_ACCESS(type, f, fp) \
+    register const type* __restrict__ fp = (f).begin()
 
 #endif
 
diff --git a/src/OpenFOAM/containers/Lists/List/undefListLoopM.H b/src/OpenFOAM/containers/Lists/List/undefListLoopM.H
deleted file mode 100644
index 3c125e2376c..00000000000
--- a/src/OpenFOAM/containers/Lists/List/undefListLoopM.H
+++ /dev/null
@@ -1,46 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software; you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by the
-    Free Software Foundation; either version 2 of the License, or (at your
-    option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM; if not, write to the Free Software Foundation,
-    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-Description
-    A List\<Type\> is a 1D array of objects of type 'Type',
-    where the size of the array is known and used for subscript
-    bounds checking, etc.
-
-\*---------------------------------------------------------------------------*/
-
-#ifdef List_FOR_ALL
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#undef List_FOR_ALL
-#undef List_END_FOR_ALL
-#undef List_ELEM
-#undef List_ACCESS
-#undef List_CONST_ACCESS
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/OpenFOAM/containers/Lists/PtrList/PtrList.C b/src/OpenFOAM/containers/Lists/PtrList/PtrList.C
index 6418537b020..11d997dd3f2 100644
--- a/src/OpenFOAM/containers/Lists/PtrList/PtrList.C
+++ b/src/OpenFOAM/containers/Lists/PtrList/PtrList.C
@@ -27,7 +27,6 @@ License
 #include "error.H"
 
 #include "PtrList.H"
-#include "PtrListLoopM.H"
 #include "SLPtrList.H"
 
 // * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/containers/Lists/PtrList/PtrListLoopM.H b/src/OpenFOAM/containers/Lists/PtrList/PtrListLoopM.H
deleted file mode 100644
index cbd6fd10dfb..00000000000
--- a/src/OpenFOAM/containers/Lists/PtrList/PtrListLoopM.H
+++ /dev/null
@@ -1,56 +0,0 @@
-/*---------------------------------------------------------------------------*\
-  =========                 |
-  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
-   \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
-     \\/     M anipulation  |
--------------------------------------------------------------------------------
-License
-    This file is part of OpenFOAM.
-
-    OpenFOAM is free software; you can redistribute it and/or modify it
-    under the terms of the GNU General Public License as published by the
-    Free Software Foundation; either version 2 of the License, or (at your
-    option) any later version.
-
-    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
-    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-    for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with OpenFOAM; if not, write to the Free Software Foundation,
-    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-Description
-    simple generic PtrList MACROS for looping
-
-\*---------------------------------------------------------------------------*/
-
-#ifndef PtrListLoop_H
-#define PtrListLoop_H
-
-#include "undefListLoopM.H"
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-// Element access looping using [] for vector and parallel machines
-
-#define List_FOR_ALL(f, i)      \
-        forAll(f, i)            \
-        {                       \
-
-#define List_END_FOR_ALL  }
-
-#define List_ELEM(f, fp, i) ((f)[i])
-
-#define List_ACCESS(type, f, fp)
-#define List_CONST_ACCESS(type, f, fp)
-
-
-// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-
-#endif
-
-// ************************************************************************* //
diff --git a/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.C b/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.C
index 02015efb9b6..bed0214749e 100644
--- a/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.C
+++ b/src/OpenFOAM/containers/Lists/UPtrList/UPtrList.C
@@ -27,7 +27,6 @@ License
 #include "error.H"
 
 #include "UPtrList.H"
-#include "PtrListLoopM.H"
 
 // * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * * //
 
diff --git a/src/OpenFOAM/fields/Fields/symmTransformField/symmTransformField.C b/src/OpenFOAM/fields/Fields/symmTransformField/symmTransformField.C
index 67cb86e1935..db24d88042d 100644
--- a/src/OpenFOAM/fields/Fields/symmTransformField/symmTransformField.C
+++ b/src/OpenFOAM/fields/Fields/symmTransformField/symmTransformField.C
@@ -50,7 +50,7 @@ void transform
     {
         TFOR_ALL_F_OP_FUNC_F_F
         (
-            Type, rtf, =, transform, tensor, trf, Type, tf
+            Type, rtf, =, transform, symmTensor, trf, Type, tf
         )
     }
 }
diff --git a/wmake/rules/linux64Gcc/c++Opt b/wmake/rules/linux64Gcc/c++Opt
index 8ac07d2124e..3446f7f58cb 100644
--- a/wmake/rules/linux64Gcc/c++Opt
+++ b/wmake/rules/linux64Gcc/c++Opt
@@ -1,4 +1,4 @@
-c++DBUG     = 
+c++DBUG     =
 c++OPT      = -O3
 #c++OPT      = -march=nocona -O3
 # -ftree-vectorize -ftree-vectorizer-verbose=3
-- 
GitLab