mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
consistency update for null pointers
- uniform use of reinterpret_cast<foo*>(0) instead of
reinterpret_cast<foo*>(NULL)
- make all static null() members inline since they are really only a cast:
"*reinterpret_cast<foo*>(0)"
This commit is contained in:
@ -3,7 +3,7 @@ int nFields = volScalarNames.size() + 3*volVectorNames.size();
|
||||
List<volScalarField*> volFieldPtrs
|
||||
(
|
||||
nFields,
|
||||
reinterpret_cast<volScalarField*>(NULL)
|
||||
reinterpret_cast<volScalarField*>(0)
|
||||
);
|
||||
|
||||
stringList volFieldNames(nFields);
|
||||
@ -27,12 +27,11 @@ nFields = 0;
|
||||
|
||||
if (ioHeader.headerOk())
|
||||
{
|
||||
volFieldPtrs[nFields] =
|
||||
new volScalarField
|
||||
(
|
||||
ioHeader,
|
||||
mesh
|
||||
);
|
||||
volFieldPtrs[nFields] = new volScalarField
|
||||
(
|
||||
ioHeader,
|
||||
mesh
|
||||
);
|
||||
}
|
||||
|
||||
fieldName = getFieldViewName(fieldName);
|
||||
@ -106,7 +105,7 @@ int nSurfFields = surfScalarNames.size() + 3*surfVectorNames.size();
|
||||
List<surfaceScalarField*> surfFieldPtrs
|
||||
(
|
||||
nSurfFields,
|
||||
reinterpret_cast<surfaceScalarField*>(NULL)
|
||||
reinterpret_cast<surfaceScalarField*>(0)
|
||||
);
|
||||
|
||||
stringList surfFieldNames(nSurfFields);
|
||||
|
||||
@ -2,13 +2,13 @@
|
||||
List<IOField<scalar>* > sprayScalarFieldPtrs
|
||||
(
|
||||
sprayScalarNames.size(),
|
||||
reinterpret_cast<IOField<scalar>*>(NULL)
|
||||
reinterpret_cast<IOField<scalar>*>(0)
|
||||
);
|
||||
|
||||
List<IOField<vector>* > sprayVectorFieldPtrs
|
||||
(
|
||||
sprayVectorNames.size(),
|
||||
reinterpret_cast<IOField<vector>*>(NULL)
|
||||
reinterpret_cast<IOField<vector>*>(0)
|
||||
);
|
||||
|
||||
{
|
||||
|
||||
@ -24,7 +24,7 @@ License
|
||||
|
||||
Description
|
||||
Translates a STAR-CD SMAP data file into FOAM field format.
|
||||
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
@ -108,15 +108,15 @@ int main(int argc, char *argv[])
|
||||
List<volScalarField*> sFields
|
||||
(
|
||||
nCols,
|
||||
reinterpret_cast<volScalarField*>(NULL)
|
||||
reinterpret_cast<volScalarField*>(0)
|
||||
);
|
||||
|
||||
List<volVectorField*> vFields
|
||||
(
|
||||
nCols,
|
||||
reinterpret_cast<volVectorField*>(NULL)
|
||||
reinterpret_cast<volVectorField*>(0)
|
||||
);
|
||||
|
||||
|
||||
label i=0;
|
||||
while (i < nCols)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user