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:
@ -711,7 +711,7 @@ int main(int argc, char *argv[])
|
||||
10 // externalAngleTolerance
|
||||
);
|
||||
|
||||
if (vtkWriter.valid())
|
||||
if (vtkWriter)
|
||||
{
|
||||
vtkWriter->beginCellData();
|
||||
vtkWriter->write("internalCloseness", tcloseness[0]());
|
||||
@ -735,7 +735,7 @@ int main(int argc, char *argv[])
|
||||
maxProximity
|
||||
);
|
||||
|
||||
if (vtkWriter.valid())
|
||||
if (vtkWriter)
|
||||
{
|
||||
vtkWriter->beginCellData();
|
||||
vtkWriter->write("featureProximity", tproximity());
|
||||
@ -753,7 +753,7 @@ int main(int argc, char *argv[])
|
||||
surf
|
||||
);
|
||||
|
||||
if (vtkWriter.valid())
|
||||
if (vtkWriter)
|
||||
{
|
||||
vtkWriter->beginPointData();
|
||||
vtkWriter->write("curvature", tcurvature());
|
||||
|
||||
Reference in New Issue
Block a user