Skip to content
Snippets Groups Projects
Commit 2e7d1623 authored by andy's avatar andy
Browse files

ENH: messageStream - updated output when using (bool) operator

parent 0ccbf6e7
Branches
Tags
No related merge requests found
......@@ -188,39 +188,14 @@ Foam::OSstream& Foam::messageStream::operator()
Foam::OSstream& Foam::messageStream::operator()(const bool output)
{
if (level)
if (output)
{
bool collect = (severity_ == INFO || severity_ == WARNING);
// Report the error
if (!output && collect)
{
return Snull;
}
else
{
if (title().size())
{
Pout<< title().c_str();
}
if (maxErrors_)
{
errorCount_++;
if (errorCount_ >= maxErrors_)
{
FatalErrorIn("messageStream::operator OSstream&()")
<< "Too many errors"
<< abort(FatalError);
}
}
return Pout;
}
return operator()();
}
else
{
return Snull;
}
return Snull;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment