mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
STYLE: replace uses of autoPtr::empty() with bool check (#1775)
- less clutter using plain tests with the bool operator:
(!ptr) vs (ptr.empty())
(ptr) vs (!ptr.empty())
This commit is contained in:
@ -91,7 +91,7 @@ Foam::pointHistory::pointHistory
|
||||
refHistoryPoint_(dict.lookup("refHistoryPoint")),
|
||||
processor_(-1),
|
||||
fileName_(dict.get<word>("fileName")),
|
||||
historyFilePtr_()
|
||||
historyFilePtr_(nullptr)
|
||||
{
|
||||
Info<< "Creating " << this->name() << " function object." << endl;
|
||||
|
||||
@ -144,7 +144,7 @@ Foam::pointHistory::pointHistory
|
||||
}
|
||||
|
||||
// Create history file if not already created
|
||||
if (historyFilePtr_.empty())
|
||||
if (!historyFilePtr_)
|
||||
{
|
||||
// File update
|
||||
if (Pstream::master())
|
||||
@ -180,13 +180,11 @@ Foam::pointHistory::pointHistory
|
||||
);
|
||||
|
||||
// Add headers to output data
|
||||
if (historyFilePtr_.valid())
|
||||
if (historyFilePtr_)
|
||||
{
|
||||
historyFilePtr_()
|
||||
<< "# Time" << tab << "X" << tab
|
||||
<< "Y" << tab << "Z";
|
||||
|
||||
historyFilePtr_() << endl;
|
||||
<< "# Time" << tab << "X" << tab << "Y" << tab << "Z"
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user