mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user