mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: check autoPtr as plain bool instead of valid()
- cleaner code, more similarity with unique_ptr
Now
if (ptr)
if (!ptr)
instead
if (ptr.valid())
if (!ptr.valid())
This commit is contained in:
@ -241,7 +241,7 @@ Foam::OFstream& Foam::functionObjects::writeFile::file()
|
||||
return Snull;
|
||||
}
|
||||
|
||||
if (!filePtr_.valid())
|
||||
if (!filePtr_)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "File pointer not allocated\n";
|
||||
|
||||
Reference in New Issue
Block a user