STYLE: use 'return nullptr' for empty autoPtr/tmp returns

- both autoPtr and tmp are defined with an implicit construct from
  nullptr (but with explicit construct from a pointer to null).
  Thus is it safe to use 'nullptr' when returning an empty autoPtr or tmp.
This commit is contained in:
Mark Olesen
2018-03-21 09:31:09 +01:00
parent 2f86cdc712
commit 018124e3bf
68 changed files with 109 additions and 117 deletions

View File

@ -794,14 +794,12 @@ Foam::DistributedDelaunayMesh<Triangulation>::distribute
{
if (!Pstream::parRun())
{
return autoPtr<mapDistribute>();
return nullptr;
}
distributeBoundBoxes(decomposition.procBounds());
autoPtr<mapDistribute> mapDist = decomposition.distributePoints(points);
return mapDist;
return decomposition.distributePoints(points);
}

View File

@ -101,7 +101,7 @@ public:
virtual autoPtr<searchableSurfaceFeatures> clone() const
{
NotImplemented;
return autoPtr<searchableSurfaceFeatures>();
return nullptr;
}
@ -139,7 +139,7 @@ public:
//- Return an extendedFeatureEdgeMesh containing the features
virtual autoPtr<extendedFeatureEdgeMesh> features() const
{
return autoPtr<extendedFeatureEdgeMesh>();
return nullptr;
}
};

View File

@ -109,7 +109,7 @@ public:
autoPtr<faceSelection> clone() const
{
NotImplemented;
return autoPtr<faceSelection>();
return nullptr;
}

View File

@ -86,7 +86,7 @@ public:
autoPtr<faceSelection> clone() const
{
NotImplemented;
return autoPtr<faceSelection>();
return nullptr;
}

View File

@ -79,7 +79,7 @@ public:
autoPtr<faceSelection> clone() const
{
NotImplemented;
return autoPtr<faceSelection>();
return nullptr;
}