From 85bae17943d9670f81a85fe00907538c3d4e8364 Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@Germany>
Date: Fri, 17 Dec 2010 14:36:13 +0100
Subject: [PATCH] STYLE: add formatting of NamedEnum template arguments

---
 src/OSspecific/POSIX/fileMonitor.C            |  6 ++-
 src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C |  6 ++-
 src/OpenFOAM/db/Time/Time.C                   | 12 ++++-
 src/OpenFOAM/db/regIOobject/regIOobject.C     |  6 ++-
 .../constraint/oldCyclic/oldCyclicPolyPatch.C | 24 +++++-----
 .../primitiveShapes/triangle/intersection.C   | 12 ++++-
 .../meshCut/directions/directions.C           | 13 ++++--
 .../phaseProperties/phaseProperties.C         |  6 ++-
 .../refinementSurfaces/refinementSurfaces.C   |  7 ++-
 .../directMappedPatchBase.C                   | 20 ++++++--
 .../sets/cellSources/faceToCell/faceToCell.C  |  6 ++-
 .../faceZoneToCell/faceZoneToCell.C           |  6 ++-
 .../cellSources/pointToCell/pointToCell.C     |  6 ++-
 .../sets/faceSources/cellToFace/cellToFace.C  |  6 ++-
 .../faceSources/pointToFace/pointToFace.C     |  6 ++-
 .../pointSources/cellToPoint/cellToPoint.C    |  6 ++-
 .../pointSources/faceToPoint/faceToPoint.C    |  6 ++-
 .../sets/topoSetSource/topoSetSource.C        |  6 ++-
 .../fieldAverageItem/fieldAverageItem.C       |  6 ++-
 .../field/fieldMinMax/fieldMinMax.C           |  6 ++-
 .../field/fieldValues/cellSource/cellSource.C | 43 ++++++++++++-----
 .../field/fieldValues/faceSource/faceSource.C | 46 +++++++++++++------
 src/sampling/sampledSet/coordSet/coordSet.C   |  6 ++-
 .../surfaceFilmModel/surfaceFilmModel.C       | 21 +++++----
 .../temperatureCoupledBase.C                  | 24 ++++++----
 25 files changed, 228 insertions(+), 84 deletions(-)

diff --git a/src/OSspecific/POSIX/fileMonitor.C b/src/OSspecific/POSIX/fileMonitor.C
index 329e52ccc0a..8abbf768eac 100644
--- a/src/OSspecific/POSIX/fileMonitor.C
+++ b/src/OSspecific/POSIX/fileMonitor.C
@@ -55,7 +55,11 @@ const Foam::NamedEnum<Foam::fileMonitor::fileState, 3>
 namespace Foam
 {
     template<>
-    const char* Foam::NamedEnum<Foam::fileMonitor::fileState, 3>::names[] =
+    const char* Foam::NamedEnum
+    <
+        Foam::fileMonitor::fileState,
+        3
+    >::names[] =
     {
         "unmodified",
         "modified",
diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C
index 51e2fadfe77..508db4869bb 100644
--- a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C
+++ b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.C
@@ -35,7 +35,11 @@ defineTypeNameAndDebug(Foam::UPstream, 0);
 namespace Foam
 {
     template<>
-    const char* Foam::NamedEnum<Foam::UPstream::commsTypes, 3>::names[] =
+    const char* Foam::NamedEnum
+    <
+        Foam::UPstream::commsTypes,
+        3
+    >::names[] =
     {
         "blocking",
         "scheduled",
diff --git a/src/OpenFOAM/db/Time/Time.C b/src/OpenFOAM/db/Time/Time.C
index f9a62d3b4d6..eff2e296577 100644
--- a/src/OpenFOAM/db/Time/Time.C
+++ b/src/OpenFOAM/db/Time/Time.C
@@ -35,7 +35,11 @@ defineTypeNameAndDebug(Foam::Time, 0);
 namespace Foam
 {
     template<>
-    const char* Foam::NamedEnum<Foam::Time::stopAtControls, 4>::names[] =
+    const char* Foam::NamedEnum
+    <
+        Foam::Time::stopAtControls,
+        4
+    >::names[] =
     {
         "endTime",
         "noWriteNow",
@@ -44,7 +48,11 @@ namespace Foam
     };
 
     template<>
-    const char* Foam::NamedEnum<Foam::Time::writeControls, 5>::names[] =
+    const char* Foam::NamedEnum
+    <
+        Foam::Time::writeControls,
+        5
+    >::names[] =
     {
         "timeStep",
         "runTime",
diff --git a/src/OpenFOAM/db/regIOobject/regIOobject.C b/src/OpenFOAM/db/regIOobject/regIOobject.C
index f43cb4f44ef..de93473038d 100644
--- a/src/OpenFOAM/db/regIOobject/regIOobject.C
+++ b/src/OpenFOAM/db/regIOobject/regIOobject.C
@@ -39,7 +39,11 @@ int Foam::regIOobject::fileModificationSkew
 namespace Foam
 {
     template<>
-    const char* Foam::NamedEnum<Foam::regIOobject::fileCheckTypes, 4>::names[] =
+    const char* Foam::NamedEnum
+    <
+        Foam::regIOobject::fileCheckTypes,
+        4
+    >::names[] =
     {
         "timeStamp",
         "timeStampMaster",
diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C
index 218debfa5b0..4b75c071fe2 100644
--- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C
+++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C
@@ -44,19 +44,21 @@ namespace Foam
     addToRunTimeSelectionTable(polyPatch, oldCyclicPolyPatch, word);
     addToRunTimeSelectionTable(polyPatch, oldCyclicPolyPatch, dictionary);
 
-
-template<>
-const char* NamedEnum<oldCyclicPolyPatch::transformType, 3>::names[] =
-{
-    "unknown",
-    "rotational",
-    "translational"
-};
-
-const NamedEnum<oldCyclicPolyPatch::transformType, 3>
-    oldCyclicPolyPatch::transformTypeNames;
+    template<>
+    const char* Foam::NamedEnum
+    <
+        Foam::oldCyclicPolyPatch::transformType,
+        3
+    >::names[] =
+    {
+        "unknown",
+        "rotational",
+        "translational"
+    };
 }
 
+const Foam::NamedEnum<Foam::oldCyclicPolyPatch::transformType, 3>
+    Foam::oldCyclicPolyPatch::transformTypeNames;
 
 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
 
diff --git a/src/OpenFOAM/meshes/primitiveShapes/triangle/intersection.C b/src/OpenFOAM/meshes/primitiveShapes/triangle/intersection.C
index 110754f77a1..0c2e84bdf47 100644
--- a/src/OpenFOAM/meshes/primitiveShapes/triangle/intersection.C
+++ b/src/OpenFOAM/meshes/primitiveShapes/triangle/intersection.C
@@ -32,14 +32,22 @@ Foam::scalar Foam::intersection::planarTol_ = 0.2;
 namespace Foam
 {
     template<>
-    const char* Foam::NamedEnum<Foam::intersection::direction, 2>::names[] =
+    const char* Foam::NamedEnum
+    <
+        Foam::intersection::direction,
+        2
+    >::names[] =
     {
         "vector",
         "contactSphere"
     };
 
     template<>
-    const char* Foam::NamedEnum<Foam::intersection::algorithm, 3>::names[] =
+    const char* Foam::NamedEnum
+    <
+        Foam::intersection::algorithm,
+        3
+    >::names[] =
     {
         "fullRay",
         "halfRay",
diff --git a/src/dynamicMesh/meshCut/directions/directions.C b/src/dynamicMesh/meshCut/directions/directions.C
index 7024c2ffbc5..7d601ec1883 100644
--- a/src/dynamicMesh/meshCut/directions/directions.C
+++ b/src/dynamicMesh/meshCut/directions/directions.C
@@ -39,7 +39,11 @@ License
 namespace Foam
 {
     template<>
-    const char* Foam::NamedEnum<Foam::directions::directionType, 3>::names[] =
+    const char* Foam::NamedEnum
+    <
+        Foam::directions::directionType,
+        3
+    >::names[] =
     {
         "tan1",
         "tan2",
@@ -269,7 +273,6 @@ Foam::vectorField Foam::directions::propagateDirection
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-// Construct from dictionary
 Foam::directions::directions
 (
     const polyMesh& mesh,
@@ -353,7 +356,7 @@ Foam::directions::directions
             FatalErrorIn
             (
                 "directions::directions(const polyMesh&, const dictionary&,"
-                "const twoDPointCorrector*"
+                "const twoDPointCorrector*)"
             )   << "Cannot find patch "
                 << patchName
                 << exit(FatalError);
@@ -373,7 +376,7 @@ Foam::directions::directions
             WarningIn
             (
                 "directions::directions(const polyMesh&, const dictionary&,"
-                "const twoDPointCorrector*"
+                "const twoDPointCorrector*)"
             )   << "Discarding user specified tan1 since 2D case." << endl
                 << "Recalculated tan1 from face normal and planeNormal as "
                 << tan1 << endl << endl;
@@ -441,7 +444,7 @@ Foam::directions::directions
         FatalErrorIn
         (
             "directions::directions(const polyMesh&, const dictionary&,"
-            "const twoDPointCorrector*"
+            "const twoDPointCorrector*)"
         )   << "Unknown coordinate system "
             << coordSystem << endl
             << "Known types are global and patchLocal"
diff --git a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C
index 4ad492b064a..18c7e9a38c5 100644
--- a/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C
+++ b/src/lagrangian/intermediate/phaseProperties/phaseProperties/phaseProperties.C
@@ -30,7 +30,11 @@ License
 namespace Foam
 {
     template<>
-    const char* Foam::NamedEnum<Foam::phaseProperties::phaseType, 4>::names[] =
+    const char* Foam::NamedEnum
+    <
+        Foam::phaseProperties::phaseType,
+        4
+    >::names[] =
     {
         "gas",
         "liquid",
diff --git a/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C b/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C
index 9a91bcccb0b..91c7a07fc58 100644
--- a/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C
+++ b/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C
@@ -37,8 +37,11 @@ License
 namespace Foam
 {
     template<>
-    const char*
-    Foam::NamedEnum<Foam::refinementSurfaces::areaSelectionAlgo, 4>::names[] =
+    const char* Foam::NamedEnum
+    <
+        Foam::refinementSurfaces::areaSelectionAlgo,
+        4
+    >::names[] =
     {
         "inside",
         "outside",
diff --git a/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C b/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C
index 6418c8c8c54..35427e849ff 100644
--- a/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C
+++ b/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C
@@ -43,7 +43,11 @@ namespace Foam
     defineTypeNameAndDebug(directMappedPatchBase, 0);
 
     template<>
-    const char* NamedEnum<directMappedPatchBase::sampleMode, 3>::names[] =
+    const char* Foam::NamedEnum
+    <
+        Foam::directMappedPatchBase::sampleMode,
+        3
+    >::names[] =
     {
         "nearestCell",
         "nearestPatchFace",
@@ -55,7 +59,11 @@ namespace Foam
 
 
     template<>
-    const char* NamedEnum<directMappedPatchBase::offsetMode, 3>::names[] =
+    const char* Foam::NamedEnum
+    <
+        Foam::directMappedPatchBase::offsetMode,
+        3
+    >::names[] =
     {
         "uniform",
         "nonuniform",
@@ -74,7 +82,6 @@ namespace Foam
 
     class nearestEqOp
     {
-
     public:
 
         void operator()(nearInfo& x, const nearInfo& y) const
@@ -95,6 +102,13 @@ namespace Foam
 }
 
 
+const Foam::NamedEnum<Foam::directMappedPatchBase::sampleMode, 3>
+    Foam::directMappedPatchBase::sampleModeNames_;
+
+const Foam::NamedEnum<Foam::directMappedPatchBase::offsetMode, 3>
+    Foam::directMappedPatchBase::offsetModeNames_;
+
+
 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
 
 void Foam::directMappedPatchBase::collectSamples
diff --git a/src/meshTools/sets/cellSources/faceToCell/faceToCell.C b/src/meshTools/sets/cellSources/faceToCell/faceToCell.C
index 9589929aeda..a04fef9f6d5 100644
--- a/src/meshTools/sets/cellSources/faceToCell/faceToCell.C
+++ b/src/meshTools/sets/cellSources/faceToCell/faceToCell.C
@@ -38,7 +38,11 @@ namespace Foam
     addToRunTimeSelectionTable(topoSetSource, faceToCell, istream);
 
     template<>
-    const char* Foam::NamedEnum<Foam::faceToCell::faceAction, 4>::names[] =
+    const char* Foam::NamedEnum
+    <
+        Foam::faceToCell::faceAction,
+        4
+    >::names[] =
     {
         "neighbour",
         "owner",
diff --git a/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.C b/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.C
index 2d5bd7f4d50..26bf40ec32b 100644
--- a/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.C
+++ b/src/meshTools/sets/cellSources/faceZoneToCell/faceZoneToCell.C
@@ -37,7 +37,11 @@ namespace Foam
     addToRunTimeSelectionTable(topoSetSource, faceZoneToCell, istream);
 
     template<>
-    const char* Foam::NamedEnum<Foam::faceZoneToCell::faceAction, 2>::names[] =
+    const char* Foam::NamedEnum
+    <
+        Foam::faceZoneToCell::faceAction,
+        2
+    >::names[] =
     {
         "master",
         "slave"
diff --git a/src/meshTools/sets/cellSources/pointToCell/pointToCell.C b/src/meshTools/sets/cellSources/pointToCell/pointToCell.C
index ebb3a010b94..aaa11f0e1dc 100644
--- a/src/meshTools/sets/cellSources/pointToCell/pointToCell.C
+++ b/src/meshTools/sets/cellSources/pointToCell/pointToCell.C
@@ -38,7 +38,11 @@ namespace Foam
     addToRunTimeSelectionTable(topoSetSource, pointToCell, istream);
 
     template<>
-    const char* Foam::NamedEnum<Foam::pointToCell::pointAction, 1>::names[] =
+    const char* Foam::NamedEnum
+    <
+        Foam::pointToCell::pointAction,
+        1
+    >::names[] =
     {
         "any"
     };
diff --git a/src/meshTools/sets/faceSources/cellToFace/cellToFace.C b/src/meshTools/sets/faceSources/cellToFace/cellToFace.C
index 2ff1769c8f9..1f53ba28640 100644
--- a/src/meshTools/sets/faceSources/cellToFace/cellToFace.C
+++ b/src/meshTools/sets/faceSources/cellToFace/cellToFace.C
@@ -39,7 +39,11 @@ namespace Foam
     addToRunTimeSelectionTable(topoSetSource, cellToFace, istream);
 
     template<>
-    const char* Foam::NamedEnum<Foam::cellToFace::cellAction, 2>::names[] =
+    const char* Foam::NamedEnum
+    <
+        Foam::cellToFace::cellAction,
+        2
+    >::names[] =
     {
         "all",
         "both"
diff --git a/src/meshTools/sets/faceSources/pointToFace/pointToFace.C b/src/meshTools/sets/faceSources/pointToFace/pointToFace.C
index 8e272b86dff..59066e87b71 100644
--- a/src/meshTools/sets/faceSources/pointToFace/pointToFace.C
+++ b/src/meshTools/sets/faceSources/pointToFace/pointToFace.C
@@ -38,7 +38,11 @@ namespace Foam
     addToRunTimeSelectionTable(topoSetSource, pointToFace, istream);
 
     template<>
-    const char* Foam::NamedEnum<Foam::pointToFace::pointAction, 2>::names[] =
+    const char* Foam::NamedEnum
+    <
+        Foam::pointToFace::pointAction,
+        2
+    >::names[] =
     {
         "any",
         "all"
diff --git a/src/meshTools/sets/pointSources/cellToPoint/cellToPoint.C b/src/meshTools/sets/pointSources/cellToPoint/cellToPoint.C
index 5026b51cfc1..52d6ea70370 100644
--- a/src/meshTools/sets/pointSources/cellToPoint/cellToPoint.C
+++ b/src/meshTools/sets/pointSources/cellToPoint/cellToPoint.C
@@ -38,7 +38,11 @@ namespace Foam
     addToRunTimeSelectionTable(topoSetSource, cellToPoint, istream);
 
     template<>
-    const char* Foam::NamedEnum<Foam::cellToPoint::cellAction, 1>::names[] =
+    const char* Foam::NamedEnum
+    <
+        Foam::cellToPoint::cellAction,
+        1
+    >::names[] =
     {
         "all"
     };
diff --git a/src/meshTools/sets/pointSources/faceToPoint/faceToPoint.C b/src/meshTools/sets/pointSources/faceToPoint/faceToPoint.C
index 4d0919f7c88..4a3d8d20287 100644
--- a/src/meshTools/sets/pointSources/faceToPoint/faceToPoint.C
+++ b/src/meshTools/sets/pointSources/faceToPoint/faceToPoint.C
@@ -38,7 +38,11 @@ namespace Foam
     addToRunTimeSelectionTable(topoSetSource, faceToPoint, istream);
 
     template<>
-    const char* Foam::NamedEnum<Foam::faceToPoint::faceAction, 1>::names[] =
+    const char* Foam::NamedEnum
+    <
+        Foam::faceToPoint::faceAction,
+        1
+    >::names[] =
     {
         "all"
     };
diff --git a/src/meshTools/sets/topoSetSource/topoSetSource.C b/src/meshTools/sets/topoSetSource/topoSetSource.C
index f82cf59a90d..28bf1c33cdf 100644
--- a/src/meshTools/sets/topoSetSource/topoSetSource.C
+++ b/src/meshTools/sets/topoSetSource/topoSetSource.C
@@ -36,7 +36,11 @@ namespace Foam
     defineRunTimeSelectionTable(topoSetSource, istream);
 
     template<>
-    const char* Foam::NamedEnum<Foam::topoSetSource::setAction, 8>::names[] =
+    const char* Foam::NamedEnum
+    <
+        Foam::topoSetSource::setAction,
+        8
+    >::names[] =
     {
         "clear",
         "new",
diff --git a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItem.C b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItem.C
index ee3d6e4e8ae..183de36c2c6 100644
--- a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItem.C
+++ b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItem.C
@@ -30,7 +30,11 @@ License
 namespace Foam
 {
     template<>
-    const char* Foam::NamedEnum<Foam::fieldAverageItem::baseType, 2>::names[] =
+    const char* Foam::NamedEnum
+    <
+        Foam::fieldAverageItem::baseType,
+        2
+    >::names[] =
     {
         "iteration",
         "time"
diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C
index c0f715e7162..ac9eeab52dd 100644
--- a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C
+++ b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C
@@ -36,7 +36,11 @@ defineTypeNameAndDebug(Foam::fieldMinMax, 0);
 namespace Foam
 {
     template<>
-    const char* Foam::NamedEnum<Foam::fieldMinMax::modeType, 2>::names[] =
+    const char* Foam::NamedEnum
+    <
+        Foam::fieldMinMax::modeType,
+        2
+    >::names[] =
     {
         "magnitude",
         "component"
diff --git a/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.C b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.C
index e3755efbb8b..896026c3567 100644
--- a/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.C
+++ b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.C
@@ -31,21 +31,42 @@ License
 
 defineTypeNameAndDebug(Foam::fieldValues::cellSource, 0);
 
-template<>
-const char* Foam::NamedEnum<Foam::fieldValues::cellSource::sourceType, 2>::
-names[] = {"cellZone", "all"};
+namespace Foam
+{
+
+    template<>
+    const char* Foam::NamedEnum
+    <
+        Foam::fieldValues::cellSource::sourceType,
+        2
+    >::names[] =
+    {
+        "cellZone",
+        "all"
+    };
+
+
+    template<>
+    const char* Foam::NamedEnum
+    <
+        Foam::fieldValues::cellSource::operationType,
+        7
+    >::names[] =
+    {
+        "none",
+        "sum",
+        "volAverage",
+        "volIntegrate",
+        "weightedAverage",
+        "min",
+        "max"
+    };
+}
+
 
 const Foam::NamedEnum<Foam::fieldValues::cellSource::sourceType, 2>
     Foam::fieldValues::cellSource::sourceTypeNames_;
 
-template<>
-const char* Foam::NamedEnum<Foam::fieldValues::cellSource::operationType, 7>::
-names[] =
-{
-    "none", "sum", "volAverage",
-    "volIntegrate", "weightedAverage", "min", "max"
-};
-
 const Foam::NamedEnum<Foam::fieldValues::cellSource::operationType, 7>
     Foam::fieldValues::cellSource::operationTypeNames_;
 
diff --git a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C
index 472f725dc42..838658d1a26 100644
--- a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C
+++ b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C
@@ -34,24 +34,42 @@ License
 
 defineTypeNameAndDebug(Foam::fieldValues::faceSource, 0);
 
-template<>
-const char* Foam::NamedEnum<Foam::fieldValues::faceSource::sourceType, 3>::
-names[] =
+namespace Foam
 {
-    "faceZone", "patch", "sampledSurface"
-};
+    template<>
+    const char* Foam::NamedEnum
+    <
+        Foam::fieldValues::faceSource::sourceType,
+        3
+    >::names[] =
+    {
+        "faceZone",
+        "patch",
+        "sampledSurface"
+    };
+
+
+    template<>
+    const char* Foam::NamedEnum
+    <
+        Foam::fieldValues::faceSource::operationType,
+        7
+    >::names[] =
+    {
+        "none",
+        "sum",
+        "areaAverage",
+        "areaIntegrate",
+        "weightedAverage",
+        "min",
+        "max"
+    };
 
-const Foam::NamedEnum<Foam::fieldValues::faceSource::sourceType, 3>
-    Foam::fieldValues::faceSource::sourceTypeNames_;
+}
 
 
-template<>
-const char* Foam::NamedEnum<Foam::fieldValues::faceSource::operationType, 7>::
-names[] =
-{
-    "none", "sum", "areaAverage",
-    "areaIntegrate", "weightedAverage", "min", "max"
-};
+const Foam::NamedEnum<Foam::fieldValues::faceSource::sourceType, 3>
+    Foam::fieldValues::faceSource::sourceTypeNames_;
 
 const Foam::NamedEnum<Foam::fieldValues::faceSource::operationType, 7>
     Foam::fieldValues::faceSource::operationTypeNames_;
diff --git a/src/sampling/sampledSet/coordSet/coordSet.C b/src/sampling/sampledSet/coordSet/coordSet.C
index 24d6b4174ca..81e322d6a6f 100644
--- a/src/sampling/sampledSet/coordSet/coordSet.C
+++ b/src/sampling/sampledSet/coordSet/coordSet.C
@@ -30,7 +30,11 @@ License
 namespace Foam
 {
     template<>
-    const char* Foam::NamedEnum<Foam::coordSet::coordFormat, 5>::names[] =
+    const char* Foam::NamedEnum
+    <
+        Foam::coordSet::coordFormat,
+        5
+    >::names[] =
     {
         "xyz",
         "x",
diff --git a/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModel.C b/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModel.C
index 9ac01432fbb..65e97c62dc7 100644
--- a/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModel.C
+++ b/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModel.C
@@ -37,18 +37,19 @@ namespace Foam
         defineTypeNameAndDebug(surfaceFilmModel, 0);
         defineRunTimeSelectionTable(surfaceFilmModel, mesh);
     }
-}
-
 
-template<>
-const char*
-Foam::NamedEnum<Foam::surfaceFilmModels::surfaceFilmModel::thermoModelType, 2>::
-names[] =
-{
-    "constant",
-    "singleComponent"
-};
+    template<>
+    const char* Foam::NamedEnum
+    <
+        Foam::surfaceFilmModels::surfaceFilmModel::thermoModelType,
+        2
+    >::names[] =
+    {
+        "constant",
+        "singleComponent"
+    };
 
+}
 
 const
 Foam::NamedEnum<Foam::surfaceFilmModels::surfaceFilmModel::thermoModelType, 2>
diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C
index 3fe205f4562..f6543597bf4 100644
--- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C
+++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C
@@ -31,18 +31,24 @@ License
 
 // * * * * * * * * * * * * * Static Member Data  * * * * * * * * * * * * * * //
 
-template<>
-const char* Foam::NamedEnum<Foam::temperatureCoupledBase::KMethodType, 4>::
-names[] =
+namespace Foam
 {
-    "basicThermo",
-    "solidThermo",
-    "directionalSolidThermo",
-    "lookup"
-};
+    template<>
+    const char* Foam::NamedEnum
+    <
+        Foam::temperatureCoupledBase::KMethodType,
+        4
+    >::names[] =
+    {
+        "basicThermo",
+        "solidThermo",
+        "directionalSolidThermo",
+        "lookup"
+    };
+}
 
 
-const Foam::NamedEnum<Foam::temperatureCoupledBase::KMethodType, 4> 
+const Foam::NamedEnum<Foam::temperatureCoupledBase::KMethodType, 4>
     Foam::temperatureCoupledBase::KMethodTypeNames_;
 
 
-- 
GitLab