mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -67,7 +67,7 @@ Foam::heatTransferCoeffModels::ReynoldsAnalogy::rho(const label patchi) const
|
||||
<< "Unable to set rho for patch " << patchi
|
||||
<< exit(FatalError);
|
||||
|
||||
return tmp<Field<scalar>>();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@ -94,7 +94,7 @@ Foam::heatTransferCoeffModels::ReynoldsAnalogy::Cp(const label patchi) const
|
||||
<< "Unable to set Cp for patch " << patchi
|
||||
<< exit(FatalError);
|
||||
|
||||
return tmp<Field<scalar>>();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -105,7 +105,8 @@ Foam::functionObjects::energyTransport::kappaEff() const
|
||||
|
||||
FatalErrorInFunction
|
||||
<< "Turbulence model not found" << exit(FatalError);
|
||||
return tmp<volScalarField>();
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user