From acb5d54e418265a531e9cc8f17d4e8a95b1c8c67 Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@esi-group.com>
Date: Fri, 7 Jul 2017 12:54:54 +0200
Subject: [PATCH] STYLE: initializer_list instead of IStringStream for static
 list construction

---
 src/OpenFOAM/matrices/solution/solution.C     |   6 +-
 .../semiImplicitSource/SemiImplicitSource.C   |   6 +-
 .../PatchInteractionModel.C                   |  10 +-
 .../PhaseChangeModel/PhaseChangeModel.C       |  12 +-
 .../ThermoSurfaceFilm/ThermoSurfaceFilm.C     |   9 +-
 .../AMIInterpolation/AMIInterpolation.C       |  19 +-
 .../blackBodyEmission/blackBodyEmission.C     | 203 +++++++++---------
 7 files changed, 122 insertions(+), 143 deletions(-)

diff --git a/src/OpenFOAM/matrices/solution/solution.C b/src/OpenFOAM/matrices/solution/solution.C
index 9a8c7f9aea1..5abac0fa3e2 100644
--- a/src/OpenFOAM/matrices/solution/solution.C
+++ b/src/OpenFOAM/matrices/solution/solution.C
@@ -35,9 +35,9 @@ namespace Foam
 
 // List of sub-dictionaries to rewrite
 static const Foam::List<Foam::word> subDictNames
-(
-    Foam::IStringStream("(preconditioner smoother)")()
-);
+{
+    "preconditioner", "smoother"
+};
 
 
 // * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * * //
diff --git a/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.C b/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.C
index c48eccb11ea..3cf82a868cf 100644
--- a/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.C
+++ b/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.C
@@ -32,9 +32,9 @@ License
 
 template<class Type>
 const Foam::wordList Foam::fv::SemiImplicitSource<Type>::volumeModeTypeNames_
-(
-    IStringStream("(absolute specific)")()
-);
+{
+    "absolute", "specific"
+};
 
 
 // * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C
index 7c04d40d98a..c6af1d23786 100644
--- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C
+++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C
@@ -32,12 +32,10 @@ License
 
 template<class CloudType>
 Foam::wordList Foam::PatchInteractionModel<CloudType>::interactionTypeNames_
-(
-    IStringStream
-    (
-        "(rebound stick escape)"
-    )()
-);
+{
+    "rebound", "stick", "escape"
+};
+
 
 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
 
diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.C
index 425236a295d..1a037fe3c7e 100644
--- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.C
+++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.C
@@ -30,15 +30,9 @@ License
 template<class CloudType>
 const Foam::wordList Foam::PhaseChangeModel<CloudType>::
 enthalpyTransferTypeNames
-(
-    IStringStream
-    (
-        "("
-            "latentHeat "
-            "enthalpyDifference"
-        ")"
-    )()
-);
+{
+    "latentHeat", "enthalpyDifference"
+};
 
 
 // * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * * //
diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C
index c8adea407c3..6f9ccfe51ee 100644
--- a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C
+++ b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C
@@ -34,12 +34,9 @@ using namespace Foam::constant::mathematical;
 
 template<class CloudType>
 Foam::wordList Foam::ThermoSurfaceFilm<CloudType>::interactionTypeNames_
-(
-    IStringStream
-    (
-        "(absorb bounce splashBai)"
-    )()
-);
+{
+    "absorb", "bounce", "splashBai"
+};
 
 
 // * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * * //
diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C
index ad1df281542..6253c95f9be 100644
--- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C
+++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C
@@ -83,18 +83,13 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::wordTointerpolationMethod
 {
     interpolationMethod method = imDirect;
 
-    wordList methods
-    (
-        IStringStream
-        (
-            "("
-                "directAMI "
-                "mapNearestAMI "
-                "faceAreaWeightAMI "
-                "partialFaceAreaWeightAMI"
-            ")"
-        )()
-    );
+    const wordList methods
+    {
+        "directAMI",
+        "mapNearestAMI",
+        "faceAreaWeightAMI",
+        "partialFaceAreaWeightAMI"
+    };
 
     if (im == "directAMI")
     {
diff --git a/src/thermophysicalModels/radiation/radiationModels/fvDOM/blackBodyEmission/blackBodyEmission.C b/src/thermophysicalModels/radiation/radiationModels/fvDOM/blackBodyEmission/blackBodyEmission.C
index 03ba5ca1208..46491be9715 100644
--- a/src/thermophysicalModels/radiation/radiationModels/fvDOM/blackBodyEmission/blackBodyEmission.C
+++ b/src/thermophysicalModels/radiation/radiationModels/fvDOM/blackBodyEmission/blackBodyEmission.C
@@ -32,110 +32,105 @@ using namespace Foam::constant;
 
 const Foam::List<Foam::Tuple2<Foam::scalar, Foam::scalar>>
 Foam::radiation::blackBodyEmission::emissivePowerTable
-(
-    IStringStream
-    (
-        "("
-        "( 1000 0.00032)"
-        "( 1100 0.00091)"
-        "( 1200 0.00213)"
-        "( 1300 0.00432)"
-        "( 1400 0.00779)"
-        "( 1500 0.01280)"
-        "( 1600 0.01972)"
-        "( 1700 0.02853)"
-        "( 1800 0.03934)"
-        "( 1900 0.05210)"
-        "( 2000 0.06672)"
-        "( 2100 0.08305)"
-        "( 2200 0.10088)"
-        "( 2300 0.12002)"
-        "( 2400 0.14025)"
-        "( 2500 0.16135)"
-        "( 2600 0.18311)"
-        "( 2700 0.20535)"
-        "( 2800 0.22788)"
-        "( 2900 0.25055)"
-        "( 3000 0.27322)"
-        "( 3100 0.29576)"
-        "( 3200 0.31809)"
-        "( 3300 0.34009)"
-        "( 3400 0.36172)"
-        "( 3500 0.38290)"
-        "( 3600 0.40359)"
-        "( 3700 0.42375)"
-        "( 3800 0.44336)"
-        "( 3900 0.46240)"
-        "( 4000 0.48085)"
-        "( 4100 0.49872)"
-        "( 4200 0.51599)"
-        "( 4300 0.53267)"
-        "( 4400 0.54877)"
-        "( 4500 0.56429)"
-        "( 4600 0.57925)"
-        "( 4700 0.59366)"
-        "( 4800 0.60753)"
-        "( 4900 0.62088)"
-        "( 5000 0.63372)"
-        "( 5100 0.64606)"
-        "( 5200 0.65794)"
-        "( 5300 0.66935)"
-        "( 5400 0.68033)"
-        "( 5500 0.69087)"
-        "( 5600 0.70101)"
-        "( 5700 0.71076)"
-        "( 5800 0.72012)"
-        "( 5900 0.72913)"
-        "( 6000 0.73778)"
-        "( 6100 0.74610)"
-        "( 6200 0.75410)"
-        "( 6300 0.76180)"
-        "( 6400 0.76920)"
-        "( 6500 0.77631)"
-        "( 6600 0.78316)"
-        "( 6700 0.78975)"
-        "( 6800 0.79609)"
-        "( 6900 0.80219)"
-        "( 7000 0.80807)"
-        "( 7100 0.81373)"
-        "( 7200 0.81918)"
-        "( 7300 0.82443)"
-        "( 7400 0.82949)"
-        "( 7500 0.83436)"
-        "( 7600 0.83906)"
-        "( 7700 0.84359)"
-        "( 7800 0.84796)"
-        "( 7900 0.85218)"
-        "( 8000 0.85625)"
-        "( 8100 0.86017)"
-        "( 8200 0.86396)"
-        "( 8300 0.86762)"
-        "( 8400 0.87115)"
-        "( 8500 0.87456)"
-        "( 8600 0.87786)"
-        "( 8700 0.88105)"
-        "( 8800 0.88413)"
-        "( 8900 0.88711)"
-        "( 9000 0.88999)"
-        "( 9100 0.89277)"
-        "( 9200 0.89547)"
-        "( 9300 0.89807)"
-        "( 9400 0.90060)"
-        "( 9500 0.90304)"
-        "( 9600 0.90541)"
-        "( 9700 0.90770)"
-        "( 9800 0.90992)"
-        "( 9900 0.91207)"
-        "(10000 0.91415)"
-        "(12000 0.94505)"
-        "(15000 0.96893)"
-        "(20000 0.98555)"
-        "(30000 0.99529)"
-        "(40000 0.99792)"
-        "(50000 0.99890)"
-        ")"
-    )()
-);
+{
+    {  1000, 0.00032 },
+    {  1100, 0.00091 },
+    {  1200, 0.00213 },
+    {  1300, 0.00432 },
+    {  1400, 0.00779 },
+    {  1500, 0.01280 },
+    {  1600, 0.01972 },
+    {  1700, 0.02853 },
+    {  1800, 0.03934 },
+    {  1900, 0.05210 },
+    {  2000, 0.06672 },
+    {  2100, 0.08305 },
+    {  2200, 0.10088 },
+    {  2300, 0.12002 },
+    {  2400, 0.14025 },
+    {  2500, 0.16135 },
+    {  2600, 0.18311 },
+    {  2700, 0.20535 },
+    {  2800, 0.22788 },
+    {  2900, 0.25055 },
+    {  3000, 0.27322 },
+    {  3100, 0.29576 },
+    {  3200, 0.31809 },
+    {  3300, 0.34009 },
+    {  3400, 0.36172 },
+    {  3500, 0.38290 },
+    {  3600, 0.40359 },
+    {  3700, 0.42375 },
+    {  3800, 0.44336 },
+    {  3900, 0.46240 },
+    {  4000, 0.48085 },
+    {  4100, 0.49872 },
+    {  4200, 0.51599 },
+    {  4300, 0.53267 },
+    {  4400, 0.54877 },
+    {  4500, 0.56429 },
+    {  4600, 0.57925 },
+    {  4700, 0.59366 },
+    {  4800, 0.60753 },
+    {  4900, 0.62088 },
+    {  5000, 0.63372 },
+    {  5100, 0.64606 },
+    {  5200, 0.65794 },
+    {  5300, 0.66935 },
+    {  5400, 0.68033 },
+    {  5500, 0.69087 },
+    {  5600, 0.70101 },
+    {  5700, 0.71076 },
+    {  5800, 0.72012 },
+    {  5900, 0.72913 },
+    {  6000, 0.73778 },
+    {  6100, 0.74610 },
+    {  6200, 0.75410 },
+    {  6300, 0.76180 },
+    {  6400, 0.76920 },
+    {  6500, 0.77631 },
+    {  6600, 0.78316 },
+    {  6700, 0.78975 },
+    {  6800, 0.79609 },
+    {  6900, 0.80219 },
+    {  7000, 0.80807 },
+    {  7100, 0.81373 },
+    {  7200, 0.81918 },
+    {  7300, 0.82443 },
+    {  7400, 0.82949 },
+    {  7500, 0.83436 },
+    {  7600, 0.83906 },
+    {  7700, 0.84359 },
+    {  7800, 0.84796 },
+    {  7900, 0.85218 },
+    {  8000, 0.85625 },
+    {  8100, 0.86017 },
+    {  8200, 0.86396 },
+    {  8300, 0.86762 },
+    {  8400, 0.87115 },
+    {  8500, 0.87456 },
+    {  8600, 0.87786 },
+    {  8700, 0.88105 },
+    {  8800, 0.88413 },
+    {  8900, 0.88711 },
+    {  9000, 0.88999 },
+    {  9100, 0.89277 },
+    {  9200, 0.89547 },
+    {  9300, 0.89807 },
+    {  9400, 0.90060 },
+    {  9500, 0.90304 },
+    {  9600, 0.90541 },
+    {  9700, 0.90770 },
+    {  9800, 0.90992 },
+    {  9900, 0.91207 },
+    { 10000, 0.91415 },
+    { 12000, 0.94505 },
+    { 15000, 0.96893 },
+    { 20000, 0.98555 },
+    { 30000, 0.99529 },
+    { 40000, 0.99792 },
+    { 50000, 0.99890 }
+};
 
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
-- 
GitLab