From 27c58dde4c9f63cd5299856d94acd1027162be97 Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@esi-group.com>
Date: Fri, 8 Feb 2019 16:35:53 +0100
Subject: [PATCH] STYLE: provide boolList, boolUList typedefs directly in
 container

- move declaration of emptyLabelList (now deprecated) out of List.H
---
 src/OpenFOAM/containers/Lists/List/List.H     |  9 +++----
 .../containers/Lists/SubList/SubList.H        |  6 +++--
 .../Lists/UIndirectList/UIndirectList.H       |  6 ++---
 src/OpenFOAM/containers/Lists/UList/UList.H   |  5 ++--
 .../primitives/bools/lists/boolList.H         | 17 +++----------
 .../primitives/ints/lists/labelList.C         |  2 +-
 .../primitives/ints/lists/labelList.H         | 25 +++++--------------
 7 files changed, 23 insertions(+), 47 deletions(-)

diff --git a/src/OpenFOAM/containers/Lists/List/List.H b/src/OpenFOAM/containers/Lists/List/List.H
index 9615ef1ee77..7a8a2cb8633 100644
--- a/src/OpenFOAM/containers/Lists/List/List.H
+++ b/src/OpenFOAM/containers/Lists/List/List.H
@@ -72,12 +72,9 @@ template<class T> class BiIndirectList;
 template<class T> Istream& operator>>(Istream& is, List<T>& list);
 
 // Common list types
-typedef List<char> charList;
-typedef List<label> labelList;
-
-//- A zero-sized list of labels
-//  \deprecated(2019-02) use labelList::null() instead
-extern const labelList emptyLabelList;
+typedef List<bool> boolList;        //!< A List of bools
+typedef List<char> charList;        //!< A List of chars
+typedef List<label> labelList;      //!< A List of labels
 
 
 /*---------------------------------------------------------------------------*\
diff --git a/src/OpenFOAM/containers/Lists/SubList/SubList.H b/src/OpenFOAM/containers/Lists/SubList/SubList.H
index 93f3a560ea9..70d9ddb3b51 100644
--- a/src/OpenFOAM/containers/Lists/SubList/SubList.H
+++ b/src/OpenFOAM/containers/Lists/SubList/SubList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2017 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2017-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011-2016 OpenFOAM Foundation
@@ -53,7 +53,9 @@ namespace Foam
 template<class T> class SubList;
 
 // Common list types
-typedef SubList<label> labelSubList;
+typedef SubList<bool> boolSubList;      //!< A SubList of bools
+typedef SubList<char> charSubList;      //!< A SubList of chars
+typedef SubList<label> labelSubList;    //!< A SubList of labels
 
 
 /*---------------------------------------------------------------------------*\
diff --git a/src/OpenFOAM/containers/Lists/UIndirectList/UIndirectList.H b/src/OpenFOAM/containers/Lists/UIndirectList/UIndirectList.H
index 27f38b87dba..b7086b005ae 100644
--- a/src/OpenFOAM/containers/Lists/UIndirectList/UIndirectList.H
+++ b/src/OpenFOAM/containers/Lists/UIndirectList/UIndirectList.H
@@ -53,9 +53,9 @@ namespace Foam
 // Forward declarations
 template<class T> class UIndirectList;
 
-// Commonly required list types
-typedef UIndirectList<bool> boolUIndList;
-typedef UIndirectList<label> labelUIndList;
+// Common list types
+typedef UIndirectList<bool> boolUIndList;       //!< UIndirectList of bools
+typedef UIndirectList<label> labelUIndList;     //!< UIndirectList of labels
 
 /*---------------------------------------------------------------------------*\
                         Class UIndirectList Declaration
diff --git a/src/OpenFOAM/containers/Lists/UList/UList.H b/src/OpenFOAM/containers/Lists/UList/UList.H
index 47ac45c8cce..3e4ea24f36a 100644
--- a/src/OpenFOAM/containers/Lists/UList/UList.H
+++ b/src/OpenFOAM/containers/Lists/UList/UList.H
@@ -73,8 +73,9 @@ template<class T> Istream& operator>>(Istream&, UList<T>&);
 template<class T> Ostream& operator<<(Ostream&, const UList<T>&);
 
 // Common list types
-typedef UList<char> charUList;
-typedef UList<label> labelUList;
+typedef UList<bool> boolUList;      //!< A UList of bools
+typedef UList<char> charUList;      //!< A UList of chars
+typedef UList<label> labelUList;    //!< A UList of labels
 
 
 /*---------------------------------------------------------------------------*\
diff --git a/src/OpenFOAM/primitives/bools/lists/boolList.H b/src/OpenFOAM/primitives/bools/lists/boolList.H
index fab20dc32ae..e4f3ea3049c 100644
--- a/src/OpenFOAM/primitives/bools/lists/boolList.H
+++ b/src/OpenFOAM/primitives/bools/lists/boolList.H
@@ -23,18 +23,6 @@ License
     You should have received a copy of the GNU General Public License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
-Typedef
-    Foam::boolList
-
-Description
-    A List of bools.
-
-Typedef
-    Foam::boolUList
-
-Description
-    A UList of bools.
-
 Typedef
     Foam::boolListList
 
@@ -53,9 +41,10 @@ Description
 
 namespace Foam
 {
-    typedef UList<bool> boolUList;
+    // boolUlist   = defined in UList.H
+    // boolList    = defined in List.H
+    // boolSubList = defined in SubList.H
 
-    typedef List<bool> boolList;
     typedef List<List<bool>> boolListList;
 }
 
diff --git a/src/OpenFOAM/primitives/ints/lists/labelList.C b/src/OpenFOAM/primitives/ints/lists/labelList.C
index 175502437b7..7599aefa02c 100644
--- a/src/OpenFOAM/primitives/ints/lists/labelList.C
+++ b/src/OpenFOAM/primitives/ints/lists/labelList.C
@@ -23,7 +23,7 @@ License
 
 \*---------------------------------------------------------------------------*/
 
-#include "List.H"
+#include "labelList.H"
 #include <numeric>
 
 // * * * * * * * * * * * * * * Global Data Members * * * * * * * * * * * * * //
diff --git a/src/OpenFOAM/primitives/ints/lists/labelList.H b/src/OpenFOAM/primitives/ints/lists/labelList.H
index 9b22478fce8..d50026e4d87 100644
--- a/src/OpenFOAM/primitives/ints/lists/labelList.H
+++ b/src/OpenFOAM/primitives/ints/lists/labelList.H
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2017 OpenCFD Ltd.
+    \\  /    A nd           | Copyright (C) 2017-2019 OpenCFD Ltd.
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
                             | Copyright (C) 2011 OpenFOAM Foundation
@@ -23,24 +23,6 @@ License
     You should have received a copy of the GNU General Public License
     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
 
-Typedef
-    Foam::labelList
-
-Description
-    A List of labels.
-
-Typedef
-    Foam::labelSubList
-
-Description
-    A SubList of labels.
-
-Typedef
-    Foam::labelUList
-
-Description
-    A UList of labels.
-
 Typedef
     Foam::labelListList
 
@@ -72,6 +54,11 @@ namespace Foam
 
     typedef List<labelList> labelListList;
     typedef List<labelListList> labelListListList;
+
+
+    //- A zero-sized list of labels
+    //  \deprecated(2019-02) use labelList::null() instead
+    extern const labelList emptyLabelList;
 }
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-- 
GitLab