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

@ -70,7 +70,7 @@ Foam::tmp<Foam::vectorField> Foam::EulerCoordinateRotation::transform
) const
{
NotImplemented;
return tmp<vectorField>();
return nullptr;
}
@ -80,7 +80,7 @@ Foam::tmp<Foam::vectorField> Foam::EulerCoordinateRotation::invTransform
) const
{
NotImplemented;
return tmp<vectorField>();
return nullptr;
}
@ -96,8 +96,8 @@ Foam::tmp<Foam::tensorField> Foam::EulerCoordinateRotation::transformTensor
const tensorField& st
) const
{
NotImplemented;
return tmp<tensorField>();
NotImplemented;
return nullptr;
}
@ -117,7 +117,7 @@ Foam::tmp<Foam::tensorField> Foam::EulerCoordinateRotation::transformTensor
) const
{
NotImplemented;
return tmp<tensorField>();
return nullptr;
}

View File

@ -71,7 +71,7 @@ Foam::tmp<Foam::vectorField> Foam::STARCDCoordinateRotation::transform
) const
{
NotImplemented;
return tmp<vectorField>();
return nullptr;
}
@ -81,7 +81,7 @@ Foam::tmp<Foam::vectorField> Foam::STARCDCoordinateRotation::invTransform
) const
{
NotImplemented;
return tmp<vectorField>();
return nullptr;
}
@ -97,8 +97,8 @@ Foam::tmp<Foam::tensorField> Foam::STARCDCoordinateRotation::transformTensor
const tensorField& st
) const
{
NotImplemented;
return tmp<tensorField>();
NotImplemented;
return nullptr;
}
@ -118,7 +118,7 @@ Foam::tmp<Foam::tensorField> Foam::STARCDCoordinateRotation::transformTensor
) const
{
NotImplemented;
return tmp<tensorField>();
return nullptr;
}

View File

@ -245,7 +245,7 @@ Foam::tmp<Foam::tensorField> Foam::axesRotation::transformTensor
) const
{
NotImplemented;
return tmp<tensorField>();
return nullptr;
}
@ -265,7 +265,7 @@ Foam::tmp<Foam::tensorField> Foam::axesRotation::transformTensor
) const
{
NotImplemented;
return tmp<tensorField>();
return nullptr;
}

View File

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

View File

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

View File

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