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:
@ -51,7 +51,7 @@ cellShape create3DCellShape
|
||||
static List<const cellModel*> fluentCellModelLookup
|
||||
(
|
||||
7,
|
||||
reinterpret_cast<const cellModel*>(NULL)
|
||||
reinterpret_cast<const cellModel*>(0)
|
||||
);
|
||||
|
||||
fluentCellModelLookup[2] = cellModeller::lookup("tet");
|
||||
|
||||
@ -90,13 +90,13 @@ const label sammMesh::shapeFaceLookup[19][9] =
|
||||
List<const cellModel*> sammMesh::sammShapeLookup
|
||||
(
|
||||
256,
|
||||
reinterpret_cast<cellModel*>(NULL)
|
||||
reinterpret_cast<cellModel*>(0)
|
||||
);
|
||||
|
||||
List<const label*> sammMesh::sammAddressingTable
|
||||
(
|
||||
256,
|
||||
reinterpret_cast<label*>(NULL)
|
||||
reinterpret_cast<label*>(0)
|
||||
);
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
@ -48,7 +48,7 @@ void starMesh::addRegularCell
|
||||
label regularTypeFlag = -1;
|
||||
|
||||
// grab the shape from the table
|
||||
const cellModel* curModelPtr = reinterpret_cast<cellModel*>(NULL);
|
||||
const cellModel* curModelPtr = reinterpret_cast<cellModel*>(0);
|
||||
|
||||
if // Tetrahedron
|
||||
(
|
||||
@ -130,7 +130,7 @@ void starMesh::addSAMMcell
|
||||
|
||||
// grab the shape from the table
|
||||
label sammTypeFlag = -1;
|
||||
const cellModel* curModelPtr = reinterpret_cast<cellModel*>(NULL);
|
||||
const cellModel* curModelPtr = reinterpret_cast<cellModel*>(0);
|
||||
|
||||
switch (typeFlag)
|
||||
{
|
||||
|
||||
@ -299,7 +299,7 @@ bool domainDecomposition::writeDecomposition()
|
||||
(
|
||||
curPatchSizes.size()
|
||||
+ curProcessorPatchSizes.size(),
|
||||
reinterpret_cast<polyPatch*>(NULL)
|
||||
reinterpret_cast<polyPatch*>(0)
|
||||
);
|
||||
|
||||
label nPatches = 0;
|
||||
|
||||
@ -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