Sync headers and whitespace produced by library

This commit is contained in:
Henrik Rusche 2016-06-21 14:48:45 +02:00
parent 07e9416f30
commit 63e40d1381
4 changed files with 23 additions and 6 deletions

View file

@ -361,7 +361,12 @@ public:
//- Write the standard FOAM file/dictionary banner
// Optionally without -*- C++ -*- editor hint (eg, for logs)
template<class Stream>
static inline Stream& writeBanner(Stream& os, bool noHint=false);
static inline Stream& writeBanner
(
Stream& os,
bool noHint=false,
bool noCopyRight=false
);
//- Write the standard file section divider
template<class Stream>

View file

@ -28,7 +28,7 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Stream>
inline Stream& Foam::IOobject::writeBanner(Stream& os, bool noHint)
inline Stream& Foam::IOobject::writeBanner(Stream& os, bool noHint, bool noCopyright)
{
static bool spacesSet = false;
static char spaces[37];
@ -64,8 +64,20 @@ inline Stream& Foam::IOobject::writeBanner(Stream& os, bool noHint)
"| ========= | |\n"
"| \\\\ / F ield | foam-extend: Open Source CFD |\n"
"| \\\\ / O peration | Version: " << FOAMversion << spaces << "|\n"
"| \\\\ / A nd | Web: http://www.foam-extend.org |\n"
"| \\\\/ M anipulation | For copyright notice see file Copyright |\n"
"| \\\\ / A nd | Web: http://www.foam-extend.org |\n";
if (noCopyright)
{
os <<
"| \\\\/ M anipulation | |\n";
}
else
{
os <<
"| \\\\/ M anipulation | For copyright notice see file Copyright |\n";
}
os <<
"\\*---------------------------------------------------------------------------*/\n";
return os;

View file

@ -42,7 +42,7 @@ bool Foam::IOobject::writeHeader(Ostream& os) const
return false;
}
writeBanner(os)
writeBanner(os, false, true)
<< "FoamFile\n{\n"
<< " version " << os.version() << ";\n"
<< " format " << os.format() << ";\n"

View file

@ -680,7 +680,7 @@ bool Foam::polyBoundaryMesh::writeData(Ostream& os) const
<< indent << token::END_BLOCK << endl;
}
os << decrIndent << token::END_LIST;
os << decrIndent << token::END_LIST << endl;
// Check state of IOstream
os.check("polyBoundaryMesh::writeData(Ostream& os) const");