From fdee9442e05ae48eae1b1cff60d05dd8be0c9e62 Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@esi-group.com>
Date: Thu, 3 Jan 2019 19:12:12 +0100
Subject: [PATCH] STYLE: avoid flush when dictionary {} closing (issue #1145)

- a holdover from introducing the endBlock() method
---
 src/OpenFOAM/db/dictionary/dictionaryIO.C                     | 4 ++--
 .../GeometricFields/GeometricField/GeometricBoundaryField.C   | 2 +-
 src/OpenFOAM/meshes/primitiveShapes/plane/plane.C             | 2 +-
 src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C         | 2 +-
 src/OpenFOAM/primitives/functions/Function1/Sine/Sine.C       | 2 +-
 src/OpenFOAM/primitives/functions/Function1/Square/Square.C   | 2 +-
 .../primitives/functions/Function1/TableFile/TableFile.C      | 2 +-
 src/conversion/ensight/part/ensightPartCells.C                | 4 ++--
 src/conversion/ensight/part/ensightPartFaces.C                | 4 ++--
 .../field/fieldAverage/fieldAverageItem/fieldAverageItemIO.C  | 2 +-
 10 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/OpenFOAM/db/dictionary/dictionaryIO.C b/src/OpenFOAM/db/dictionary/dictionaryIO.C
index b425437547..e48a13f797 100644
--- a/src/OpenFOAM/db/dictionary/dictionaryIO.C
+++ b/src/OpenFOAM/db/dictionary/dictionaryIO.C
@@ -163,7 +163,7 @@ void Foam::dictionary::writeEntry(const keyType& kw, Ostream& os) const
 {
     os.beginBlock(kw);
     writeEntries(os);
-    os.endBlock() << flush;
+    os.endBlock();
 }
 
 
@@ -205,7 +205,7 @@ void Foam::dictionary::write(Ostream& os, const bool subDict) const
 
     if (subDict)
     {
-        os.endBlock() << flush;
+        os.endBlock();
     }
 }
 
diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C
index b2d299af9b..15341e144d 100644
--- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C
+++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C
@@ -530,7 +530,7 @@ writeEntry(const word& keyword, Ostream& os) const
 {
     os.beginBlock(keyword);
     this->writeEntries(os);
-    os.endBlock() << flush;
+    os.endBlock();
 
     os.check(FUNCTION_NAME);
 }
diff --git a/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C b/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C
index ec1cd8f19c..80f9088372 100644
--- a/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C
+++ b/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C
@@ -438,7 +438,7 @@ void Foam::plane::writeDict(Ostream& os) const
     os.writeEntry("point",  origin_);
     os.writeEntry("normal", normal_);
 
-    os.endBlock() << flush;
+    os.endBlock();
 }
 
 
diff --git a/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C b/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C
index 93836d807b..f03000f430 100644
--- a/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C
+++ b/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C
@@ -284,7 +284,7 @@ void Foam::Function1Types::CSV<Type>::writeData(Ostream& os) const
     os.writeEntry("mergeSeparators", mergeSeparators_);
     os.writeEntry("file", fName_);
 
-    os.endBlock() << flush;
+    os.endBlock();
 }
 
 
diff --git a/src/OpenFOAM/primitives/functions/Function1/Sine/Sine.C b/src/OpenFOAM/primitives/functions/Function1/Sine/Sine.C
index 732f329147..610ac41893 100644
--- a/src/OpenFOAM/primitives/functions/Function1/Sine/Sine.C
+++ b/src/OpenFOAM/primitives/functions/Function1/Sine/Sine.C
@@ -86,7 +86,7 @@ void Foam::Function1Types::Sine<Type>::writeData(Ostream& os) const
     scale_->writeData(os);
     level_->writeData(os);
 
-    os.endBlock() << flush;
+    os.endBlock();
 }
 
 
diff --git a/src/OpenFOAM/primitives/functions/Function1/Square/Square.C b/src/OpenFOAM/primitives/functions/Function1/Square/Square.C
index d9f06f5bc5..157ecce2dd 100644
--- a/src/OpenFOAM/primitives/functions/Function1/Square/Square.C
+++ b/src/OpenFOAM/primitives/functions/Function1/Square/Square.C
@@ -89,7 +89,7 @@ void Foam::Function1Types::Square<Type>::writeData(Ostream& os) const
     scale_->writeData(os);
     level_->writeData(os);
 
-    os.endBlock() << flush;
+    os.endBlock();
 }
 
 
diff --git a/src/OpenFOAM/primitives/functions/Function1/TableFile/TableFile.C b/src/OpenFOAM/primitives/functions/Function1/TableFile/TableFile.C
index f58f7d4c15..06c041889f 100644
--- a/src/OpenFOAM/primitives/functions/Function1/TableFile/TableFile.C
+++ b/src/OpenFOAM/primitives/functions/Function1/TableFile/TableFile.C
@@ -87,7 +87,7 @@ void Foam::Function1Types::TableFile<Type>::writeData(Ostream& os) const
 
     os.writeEntry("file", fName_);
 
-    os.endBlock() << flush;
+    os.endBlock();
 }
 
 
diff --git a/src/conversion/ensight/part/ensightPartCells.C b/src/conversion/ensight/part/ensightPartCells.C
index b4fc02ad6a..25ef3bf3a9 100644
--- a/src/conversion/ensight/part/ensightPartCells.C
+++ b/src/conversion/ensight/part/ensightPartCells.C
@@ -293,7 +293,7 @@ void Foam::ensightPartCells::writeSummary(Ostream& os) const
     os.writeEntry("name",   name());
     os.writeEntry("size",   size());
 
-    os.endBlock() << flush;
+    os.endBlock();
 }
 
 
@@ -322,7 +322,7 @@ void Foam::ensightPartCells::dumpInfo(Ostream& os) const
         os << ')' << endEntry;
     }
 
-    os.endBlock() << flush;
+    os.endBlock();
 }
 
 
diff --git a/src/conversion/ensight/part/ensightPartFaces.C b/src/conversion/ensight/part/ensightPartFaces.C
index e0ed197639..8358f71371 100644
--- a/src/conversion/ensight/part/ensightPartFaces.C
+++ b/src/conversion/ensight/part/ensightPartFaces.C
@@ -257,7 +257,7 @@ void Foam::ensightPartFaces::writeSummary(Ostream& os) const
     os.writeEntry("start",  start_);
     os.writeEntry("size",   size());
 
-    os.endBlock() << flush;
+    os.endBlock();
 }
 
 
@@ -287,7 +287,7 @@ void Foam::ensightPartFaces::dumpInfo(Ostream& os) const
         os << ')' << endEntry;
     }
 
-    os.endBlock() << flush;
+    os.endBlock();
 }
 
 
diff --git a/src/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItemIO.C b/src/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItemIO.C
index 03677d232d..858011d368 100644
--- a/src/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItemIO.C
+++ b/src/functionObjects/field/fieldAverage/fieldAverageItem/fieldAverageItemIO.C
@@ -169,7 +169,7 @@ Foam::Ostream& Foam::functionObjects::operator<<
         os.writeEntry("allowRestart", faItem.allowRestart_);
     }
 
-    os.endBlock() << flush;
+    os.endBlock();
 
     os.check(FUNCTION_NAME);
 
-- 
GitLab