messageStream: Remove confusing argument-based conditional output

This had been used in functionObjects:

    Info(log)<< "messages" << data << ....

in which it is not at all clear what the "log" argument does whereas

    if (log) Info<< "messages" << data << ....

is totally clear and more efficient.
This commit is contained in:
Henry
2015-05-18 11:54:56 +01:00
parent 0beb7e7b56
commit dd04dd9c2c
16 changed files with 38 additions and 63 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -66,13 +66,13 @@ Foam::OSstream& Foam::messageStream::masterStream(const label communicator)
error::printStack(Pout);
}
if (communicator == UPstream::worldComm)
if (communicator == UPstream::worldComm || UPstream::master(communicator))
{
return operator()();
}
else
{
return operator()(UPstream::master(communicator));
return Snull;
}
}
@ -186,19 +186,6 @@ Foam::OSstream& Foam::messageStream::operator()
}
Foam::OSstream& Foam::messageStream::operator()(const bool output)
{
if (output)
{
return operator()();
}
else
{
return Snull;
}
}
Foam::messageStream::operator Foam::OSstream&()
{
if (level)