diff --git a/applications/solvers/electromagnetics/mhdFoam/createPhiB.H b/applications/solvers/electromagnetics/mhdFoam/createPhiB.H index f79a80b82..401917f55 100644 --- a/applications/solvers/electromagnetics/mhdFoam/createPhiB.H +++ b/applications/solvers/electromagnetics/mhdFoam/createPhiB.H @@ -7,7 +7,7 @@ IOobject phiBHeader ); -surfaceScalarField* phiBPtr = NULL; +surfaceScalarField* phiBPtr = nullptr; if (phiBHeader.headerOk()) { diff --git a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.C b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.C index a3217a073..c713498ef 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.C +++ b/applications/solvers/multiphase/compressibleInterFoam/twoPhaseMixtureThermo/twoPhaseMixtureThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,8 +45,8 @@ Foam::twoPhaseMixtureThermo::twoPhaseMixtureThermo : psiThermo(mesh, word::null), twoPhaseMixture(mesh, *this), - thermo1_(NULL), - thermo2_(NULL) + thermo1_(nullptr), + thermo2_(nullptr) { { volScalarField T1(IOobject::groupName("T", phase1Name()), T_); diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/phaseModel/phaseModel.C b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/phaseModel/phaseModel.C index 2d3a7b616..c97a5a138 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/phaseModel/phaseModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -49,7 +49,7 @@ Foam::phaseModel::phaseModel name_(phaseName), p_(p), T_(T), - thermo_(NULL), + thermo_(nullptr), dgdt_ ( IOobject @@ -81,7 +81,7 @@ Foam::phaseModel::phaseModel Foam::autoPtr Foam::phaseModel::clone() const { NotImplemented; - return autoPtr(NULL); + return autoPtr(nullptr); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C index 7929a9d1a..4392e62ac 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C @@ -203,7 +203,7 @@ Foam::phaseModel::~phaseModel() Foam::autoPtr Foam::phaseModel::clone() const { NotImplemented; - return autoPtr(NULL); + return autoPtr(nullptr); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H index af4905abc..8e2d78cbe 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H @@ -123,7 +123,7 @@ ++dmIter, ++dcIter ) { - const phaseModel *phase2Ptr = NULL; + const phaseModel *phase2Ptr = nullptr; if (&phase == &dmIter()->phase1()) { diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/phase/phase.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/phase/phase.C index ae68ff168..5fc59061a 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/phase/phase.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/phase/phase.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -68,7 +68,7 @@ Foam::phase::phase Foam::autoPtr Foam::phase::clone() const { NotImplemented; - return autoPtr(NULL); + return autoPtr(nullptr); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C index 07b41eb77..9fee19e77 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -102,7 +102,7 @@ Foam::HeatTransferPhaseSystem::dmdt const Foam::phaseModel& phase ) const { - return tmp(NULL); + return tmp(nullptr); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C index 4563f191b..6e5aac34d 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C @@ -175,7 +175,7 @@ Foam::MovingPhaseModel::MovingPhaseModel fluid.mesh(), dimensionedVector("0", dimAcceleration, Zero) ), - divU_(NULL), + divU_(nullptr), turbulence_ ( phaseCompressibleTurbulenceModel::New diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C index 8d73c1286..9fa7c0f58 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -77,7 +77,7 @@ Foam::phaseModel::phaseModel Foam::autoPtr Foam::phaseModel::clone() const { NotImplemented; - return autoPtr(NULL); + return autoPtr(nullptr); } @@ -168,7 +168,7 @@ bool Foam::phaseModel::compressible() const const Foam::tmp& Foam::phaseModel::divU() const { NotImplemented; - static tmp divU_(NULL); + static tmp divU_(nullptr); return divU_; } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemTemplates.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemTemplates.C index 3ab4a91ec..01f36c881 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemTemplates.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystemTemplates.C @@ -102,7 +102,7 @@ void Foam::phaseSystem::generatePairsAndSubModels : blendingMethods_["default"] ); - autoPtr noModel(NULL); + autoPtr noModel(nullptr); forAllConstIter(typename modelTypeTable, tempModels, iter) { diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.H index b9f0f15af..5e135c161 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -115,7 +115,7 @@ public: autoPtr clone() const { NotImplemented; - return autoPtr(NULL); + return autoPtr(nullptr); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.H b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.H index fc2456871..c7655b9c3 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/IATEsource/IATEsource.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -114,7 +114,7 @@ public: autoPtr clone() const { NotImplemented; - return autoPtr(NULL); + return autoPtr(nullptr); } diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/createFields.H b/applications/solvers/stressAnalysis/solidDisplacementFoam/createFields.H index ffaada387..fd97d416f 100644 --- a/applications/solvers/stressAnalysis/solidDisplacementFoam/createFields.H +++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/createFields.H @@ -16,7 +16,7 @@ volVectorField D ); -autoPtr Tptr(NULL); +autoPtr Tptr(nullptr); if (thermalStress) { diff --git a/applications/test/HashingSpeed/Test-HashingSpeed.C b/applications/test/HashingSpeed/Test-HashingSpeed.C index 5937ad741..2d759ab99 100644 --- a/applications/test/HashingSpeed/Test-HashingSpeed.C +++ b/applications/test/HashingSpeed/Test-HashingSpeed.C @@ -943,7 +943,7 @@ uint32_t SuperFastHash (const char * data, int len) { uint32_t hash = 0; - if (len <= 0 || data == NULL) return 0; + if (len <= 0 || data == nullptr) return 0; unsigned rem = len & 3; len >>= 2; @@ -1060,14 +1060,14 @@ struct tagtest { { 0.0, "hashLookup3\t", hashLookup3 }, { 0.0, "hashLookup3Orig\t", hashLookup3Orig }, { 0.0, "SuperFastHash\t", SuperFastHash }, - { 0.0, NULL, NULL } + { 0.0, nullptr, nullptr } }; int main () { int i, j; GenerateCRC32Table (); - for (j=0; tests[j].name != NULL; j++) { + for (j=0; tests[j].name != nullptr; j++) { for (i=0; i < 3; i++) { double res = test (tests[j].hash); if (tests[j].res == 0.0 || tests[j].res > res) tests[j].res = res; diff --git a/applications/test/regex/Test-regex.C b/applications/test/regex/Test-regex.C index 35fa73a2c..6f506f765 100644 --- a/applications/test/regex/Test-regex.C +++ b/applications/test/regex/Test-regex.C @@ -81,7 +81,7 @@ int main(int argc, char *argv[]) string me("Mark"); // Handling of null strings - if (regExp(NULL).match(me)) + if (regExp(nullptr).match(me)) { Info<< "fail - matched: " << me << endl; } diff --git a/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C b/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C index d8eb8af67..7f8cb092b 100644 --- a/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C +++ b/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C @@ -648,7 +648,7 @@ int main(int argc, char *argv[]) ); // corrector for mesh motion - twoDPointCorrector* correct2DPtr = NULL; + twoDPointCorrector* correct2DPtr = nullptr; if (motionObj.headerOk()) { diff --git a/applications/utilities/mesh/advanced/selectCells/selectCells.C b/applications/utilities/mesh/advanced/selectCells/selectCells.C index 176cb966b..b09742c31 100644 --- a/applications/utilities/mesh/advanced/selectCells/selectCells.C +++ b/applications/utilities/mesh/advanced/selectCells/selectCells.C @@ -414,9 +414,9 @@ int main(int argc, char *argv[]) // Surface - autoPtr surf(NULL); + autoPtr surf(nullptr); // Search engine on surface. - autoPtr querySurf(NULL); + autoPtr querySurf(nullptr); if (useSurface) { diff --git a/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C b/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C index d45222b50..854dea352 100644 --- a/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C +++ b/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C @@ -186,7 +186,7 @@ void ReadVertices // any chunk. Normally this would be in a for loop. CCMIOSize nVertices; - CCMIOEntitySize(&err, vertices, &nVertices, NULL); + CCMIOEntitySize(&err, vertices, &nVertices, nullptr); List mapData(nVertices, 0); List verts(3*nVertices, 0); @@ -205,9 +205,9 @@ void ReadVertices CCMIOReadMap(&err, mapID, mapData.begin(), offset, offsetPlusSize); //CCMIOSize size; - //CCMIOEntityDescription(&err, vertices, &size, NULL); + //CCMIOEntityDescription(&err, vertices, &size, nullptr); //char *desc = new char[size + 1]; - //CCMIOEntityDescription(&err, vertices, NULL, desc); + //CCMIOEntityDescription(&err, vertices, nullptr, desc); //Pout<< "label: '" << desc << "'" << endl; //delete [] desc; @@ -243,7 +243,7 @@ void ReadProblem int i = 0; while ( - CCMIONextEntity(NULL, problem, kCCMIOCellType, &i, &next) + CCMIONextEntity(nullptr, problem, kCCMIOCellType, &i, &next) == kCCMIONoErr ) { @@ -255,10 +255,10 @@ void ReadProblem // an array to get the name because we do not know how long the // string is yet. Many parameters to CCMIO functions that // return - // data can be NULL if that data is not needed.) + // data can be nullptr if that data is not needed.) if ( - CCMIOReadOptstr(NULL, next, "MaterialType", &size, NULL) + CCMIOReadOptstr(nullptr, next, "MaterialType", &size, nullptr) == kCCMIONoErr ) { @@ -280,7 +280,7 @@ void ReadProblem int k = 0; while ( - CCMIONextEntity(NULL, problem, kCCMIOBoundaryRegion, &k, &boundary) + CCMIONextEntity(nullptr, problem, kCCMIOBoundaryRegion, &k, &boundary) == kCCMIONoErr ) { @@ -292,7 +292,7 @@ void ReadProblem int prostarI = -1; if ( - CCMIOReadOpti(NULL, boundary, "ProstarRegionNumber", &prostarI) + CCMIOReadOpti(nullptr, boundary, "ProstarRegionNumber", &prostarI) == kCCMIONoErr ) { @@ -318,12 +318,18 @@ void ReadProblem int size; if ( - CCMIOReadOptstr(NULL, boundary, "BoundaryType", &size, NULL) - == kCCMIONoErr + CCMIOReadOptstr + ( + nullptr, + boundary, + "BoundaryType", + &size, + nullptr + ) == kCCMIONoErr ) { char* s = new char[size + 1]; - CCMIOReadOptstr(NULL, boundary, "BoundaryType", &size, s); + CCMIOReadOptstr(nullptr, boundary, "BoundaryType", &size, s); s[size] = '\0'; foamPatchTypes[foamPatchi] = string::validate(string(s)); delete [] s; @@ -340,12 +346,18 @@ void ReadProblem if ( - CCMIOReadOptstr(NULL, boundary, "BoundaryName", &size, NULL) - == kCCMIONoErr + CCMIOReadOptstr + ( + nullptr, + boundary, + "BoundaryName", + &size, + nullptr + ) == kCCMIONoErr ) { char* name = new char[size + 1]; - CCMIOReadOptstr(NULL, boundary, "BoundaryName", &size, name); + CCMIOReadOptstr(nullptr, boundary, "BoundaryName", &size, name); name[size] = '\0'; foamPatchNames[foamPatchi] = string::validate(string(name)); @@ -353,12 +365,12 @@ void ReadProblem } else if ( - CCMIOReadOptstr(NULL, boundary, "Label", &size, NULL) + CCMIOReadOptstr(nullptr, boundary, "Label", &size, nullptr) == kCCMIONoErr ) { char* name = new char[size + 1]; - CCMIOReadOptstr(NULL, boundary, "Label", &size, name); + CCMIOReadOptstr(nullptr, boundary, "Label", &size, name); name[size] = '\0'; foamPatchNames[foamPatchi] = string::validate(string(name)); @@ -407,7 +419,7 @@ void ReadCells CCMIOID id; CCMIOGetEntity(&err, topology, kCCMIOCells, 0, &id); CCMIOSize nCells; - CCMIOEntitySize(&err, id, &nCells, NULL); + CCMIOEntitySize(&err, id, &nCells, nullptr); std::vector mapData(nCells); std::vector cellType(nCells); @@ -431,7 +443,7 @@ void ReadCells CCMIOGetEntity(&err, topology, kCCMIOInternalFaces, 0, &id); CCMIOSize nInternalFaces; - CCMIOEntitySize(&err, id, &nInternalFaces, NULL); + CCMIOEntitySize(&err, id, &nInternalFaces, nullptr); Pout<< "nInternalFaces:" << nInternalFaces << endl; // Determine patch sizes before reading internal faces @@ -439,12 +451,12 @@ void ReadCells int index = 0; while ( - CCMIONextEntity(NULL, topology, kCCMIOBoundaryFaces, &index, &id) + CCMIONextEntity(nullptr, topology, kCCMIOBoundaryFaces, &index, &id) == kCCMIONoErr ) { CCMIOSize size; - CCMIOEntitySize(&err, id, &size, NULL); + CCMIOEntitySize(&err, id, &size, nullptr); Pout<< "Read kCCMIOBoundaryFaces entry with " << size << " faces." << endl; @@ -463,10 +475,10 @@ void ReadCells mapData.resize(nInternalFaces); CCMIOGetEntity(&err, topology, kCCMIOInternalFaces, 0, &id); CCMIOSize size; - CCMIOReadFaces(&err, id, kCCMIOInternalFaces, NULL, &size, NULL, + CCMIOReadFaces(&err, id, kCCMIOInternalFaces, nullptr, &size, nullptr, kCCMIOStart, kCCMIOEnd); std::vector faces(size); - CCMIOReadFaces(&err, id, kCCMIOInternalFaces, &mapID, NULL, &faces[0], + CCMIOReadFaces(&err, id, kCCMIOInternalFaces, &mapID, nullptr, &faces[0], kCCMIOStart, kCCMIOEnd); std::vector faceCells(2*nInternalFaces); CCMIOReadFaceCells(&err, id, kCCMIOInternalFaces, &faceCells[0], @@ -503,22 +515,38 @@ void ReadCells label regionI = 0; while ( - CCMIONextEntity(NULL, topology, kCCMIOBoundaryFaces, &index, &id) + CCMIONextEntity(nullptr, topology, kCCMIOBoundaryFaces, &index, &id) == kCCMIONoErr ) { CCMIOSize nFaces; - CCMIOEntitySize(&err, id, &nFaces, NULL); + CCMIOEntitySize(&err, id, &nFaces, nullptr); mapData.resize(nFaces); faceCells.resize(nFaces); - CCMIOReadFaces(&err, id, kCCMIOBoundaryFaces, NULL, &size, NULL, + CCMIOReadFaces(&err, id, kCCMIOBoundaryFaces, nullptr, &size, nullptr, kCCMIOStart, kCCMIOEnd); faces.resize(size); - CCMIOReadFaces(&err, id, kCCMIOBoundaryFaces, &mapID, NULL, &faces[0], - kCCMIOStart, kCCMIOEnd); - CCMIOReadFaceCells(&err, id, kCCMIOBoundaryFaces, &faceCells[0], - kCCMIOStart, kCCMIOEnd); + CCMIOReadFaces + ( + &err, + id, + kCCMIOBoundaryFaces, + &mapID, + nullptr, + &faces[0], + kCCMIOStart, + kCCMIOEnd + ); + CCMIOReadFaceCells + ( + &err, + id, + kCCMIOBoundaryFaces, + &faceCells[0], + kCCMIOStart, + kCCMIOEnd + ); CCMIOReadMap(&err, mapID, &mapData[0], kCCMIOStart, kCCMIOEnd); CheckError(err, "Error reading boundary faces"); @@ -526,7 +554,7 @@ void ReadCells int prostarI; if ( - CCMIOReadOpti(NULL, id, "ProstarRegionNumber", &prostarI) + CCMIOReadOpti(nullptr, id, "ProstarRegionNumber", &prostarI) == kCCMIONoErr ) { @@ -639,12 +667,12 @@ int main(int argc, char *argv[]) } // Open the file. Because we did not initialize 'err' we need to pass - // in NULL (which always means kCCMIONoErr) and then assign the return - // value to 'err'.). + // in nullptr (which always means kCCMIONoErr) and then assign the + // return value to 'err'.). CCMIOID root; CCMIOError err = CCMIOOpenFile ( - NULL, + nullptr, ccmFile.c_str(), kCCMIORead, &root @@ -659,9 +687,9 @@ int main(int argc, char *argv[]) CheckError(err, "Error opening state"); unsigned int size; - CCMIOEntityDescription(&err, state, &size, NULL); + CCMIOEntityDescription(&err, state, &size, nullptr); char *desc = new char[size + 1]; - CCMIOEntityDescription(&err, state, NULL, desc); + CCMIOEntityDescription(&err, state, nullptr, desc); Pout<< "Reading state '" << kDefaultState << "' (" << desc << ")" << endl; delete [] desc; @@ -678,7 +706,7 @@ int main(int argc, char *argv[]) processor, &vertices, &topology, - NULL, + nullptr, &solution ); @@ -692,8 +720,8 @@ int main(int argc, char *argv[]) processor, &vertices, &topology, - NULL, - NULL + nullptr, + nullptr ); if (err != kCCMIONoErr) { diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/extrudedQuadCellShape.C b/applications/utilities/mesh/conversion/fluentMeshToFoam/extrudedQuadCellShape.C index 013481821..457b555ad 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/extrudedQuadCellShape.C +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/extrudedQuadCellShape.C @@ -47,7 +47,7 @@ cellShape extrudedQuadCellShape faceList& frontAndBackFaces ) { - static const cellModel* hexModelPtr_ = NULL; + static const cellModel* hexModelPtr_ = nullptr; if (!hexModelPtr_) { diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/extrudedTriangleCellShape.C b/applications/utilities/mesh/conversion/fluentMeshToFoam/extrudedTriangleCellShape.C index e781a66f1..a2e0acf8c 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/extrudedTriangleCellShape.C +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/extrudedTriangleCellShape.C @@ -48,7 +48,7 @@ cellShape extrudedTriangleCellShape faceList& frontAndBackFaces ) { - static const cellModel* prismModelPtr_ = NULL; + static const cellModel* prismModelPtr_ = nullptr; if (!prismModelPtr_) { diff --git a/applications/utilities/mesh/conversion/ideasUnvToFoam/unv/block_with_inlet_outlet.UNV b/applications/utilities/mesh/conversion/ideasUnvToFoam/unv/block_with_inlet_outlet.UNV index 64a2dff29..d62033b9c 100644 --- a/applications/utilities/mesh/conversion/ideasUnvToFoam/unv/block_with_inlet_outlet.UNV +++ b/applications/utilities/mesh/conversion/ideasUnvToFoam/unv/block_with_inlet_outlet.UNV @@ -258,84 +258,84 @@ YIELD STRESS 0 LINE(S) OF TEXT DIMENSIONS AND UNITS: PRESSURE PASCAL -NULL_PROPERTY +nullptr_PROPERTY -------------------------------------------------------------------------------- CONVECTIVE FILM COEFFICIENT 1 VERSION NUMBER 0 LINE(S) OF TEXT DIMENSIONS AND UNITS: CONVECTION COEFFICIENT J/M^2/K/SEC -NULL_PROPERTY +nullptr_PROPERTY -------------------------------------------------------------------------------- THERMAL CAPACITY PER UNIT AREA 1 VERSION NUMBER 0 LINE(S) OF TEXT DIMENSIONS AND UNITS: THERMAL CAPACITY PER UNIT AREA J/M^2/K -NULL_PROPERTY +nullptr_PROPERTY -------------------------------------------------------------------------------- SURFACE HEAT FLUX RATE 1 VERSION NUMBER 0 LINE(S) OF TEXT DIMENSIONS AND UNITS: HEAT FLUX PER UNIT AREA J/M^2/SEC -NULL_PROPERTY +nullptr_PROPERTY -------------------------------------------------------------------------------- VISCOSITY 1 VERSION NUMBER 0 LINE(S) OF TEXT DIMENSIONS AND UNITS: VISCOSITY KG/M/SEC -NULL_PROPERTY +nullptr_PROPERTY -------------------------------------------------------------------------------- COEFFICIENT OF FRICTION 1 VERSION NUMBER 0 LINE(S) OF TEXT DIMENSIONS AND UNITS: DIMENSIONLESS UNITLESS -NULL_PROPERTY +nullptr_PROPERTY -------------------------------------------------------------------------------- AREA FACTOR 1 VERSION NUMBER 0 LINE(S) OF TEXT DIMENSIONS AND UNITS: DIMENSIONLESS UNITLESS -NULL_PROPERTY +nullptr_PROPERTY -------------------------------------------------------------------------------- EMISSIVITY 1 VERSION NUMBER 0 LINE(S) OF TEXT DIMENSIONS AND UNITS: DIMENSIONLESS UNITLESS -NULL_PROPERTY +nullptr_PROPERTY -------------------------------------------------------------------------------- ABSORPTIVITY 1 VERSION NUMBER 0 LINE(S) OF TEXT DIMENSIONS AND UNITS: DIMENSIONLESS UNITLESS -NULL_PROPERTY +nullptr_PROPERTY -------------------------------------------------------------------------------- HEAT FLUX RATE 1 VERSION NUMBER 0 LINE(S) OF TEXT DIMENSIONS AND UNITS: HEAT FLUX PER UNIT LENGTH J/M/SEC -NULL_PROPERTY +nullptr_PROPERTY -------------------------------------------------------------------------------- INTERACTION TERM FOR TSAI-WU 1 VERSION NUMBER 0 LINE(S) OF TEXT DIMENSIONS AND UNITS: DIMENSIONLESS UNITLESS -NULL_PROPERTY +nullptr_PROPERTY -------------------------------------------------------------------------------- SWELLING COEFFICIENT 1 VERSION NUMBER 0 LINE(S) OF TEXT DIMENSIONS AND UNITS: DIMENSIONLESS UNITLESS -NULL_PROPERTY +nullptr_PROPERTY -------------------------------------------------------------------------------- DEFAULT MATERIAL PROPERT(IES): MODULUS OF ELASTICITY VERSION : 1 diff --git a/applications/utilities/mesh/conversion/sammToFoam/sammMesh.C b/applications/utilities/mesh/conversion/sammToFoam/sammMesh.C index 188d1d35a..5b62de154 100644 --- a/applications/utilities/mesh/conversion/sammToFoam/sammMesh.C +++ b/applications/utilities/mesh/conversion/sammToFoam/sammMesh.C @@ -185,7 +185,7 @@ Foam::sammMesh::sammMesh cellPolys_(0), nInternalFaces_(0), polyBoundaryPatchStartIndices_(0), - pointCellsPtr_(NULL), + pointCellsPtr_(nullptr), isShapeMesh_(true) { // Fill in the lookup tables diff --git a/applications/utilities/mesh/conversion/star3ToFoam/starMesh.C b/applications/utilities/mesh/conversion/star3ToFoam/starMesh.C index 7f48b0518..898c0c8f1 100644 --- a/applications/utilities/mesh/conversion/star3ToFoam/starMesh.C +++ b/applications/utilities/mesh/conversion/star3ToFoam/starMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -255,7 +255,7 @@ Foam::starMesh::starMesh cellPolys_(0), nInternalFaces_(0), polyBoundaryPatchStartIndices_(0), - pointCellsPtr_(NULL), + pointCellsPtr_(nullptr), couples_(0), isShapeMesh_(true) { diff --git a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C index a1f8fecf1..29969e66c 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C @@ -1177,7 +1177,11 @@ void setCouplingInfo { const polyBoundaryMesh& patches = mesh.boundaryMesh(); - List newPatches(patches.size(), static_cast(NULL)); + List newPatches + ( + patches.size(), + static_cast(nullptr) + ); forAll(zoneToPatch, zoneI) { diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C index d764f08b5..d94dc425a 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C @@ -866,7 +866,7 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh "backgroundMeshDecomposition" ) ) - : NULL + : nullptr ), cellShapeControl_ ( diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C index 50553ec4c..5a3f86f6a 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C @@ -1810,7 +1810,7 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches } // Error if startCell is null - if (startCell == NULL) + if (startCell == nullptr) { Pout<< "Start cell is null!" << endl; } diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableSurfaceFeatures.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableSurfaceFeatures.H index e114d7102..3b7335d62 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableSurfaceFeatures.H +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/searchableSurfaceFeatures/searchableSurfaceFeatures.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -101,7 +101,7 @@ public: virtual autoPtr clone() const { NotImplemented; - return autoPtr(NULL); + return autoPtr(nullptr); } diff --git a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceSelection.H b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceSelection.H index 20cb82808..41eb0b631 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceSelection.H +++ b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceSelection.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -109,7 +109,7 @@ public: autoPtr clone() const { NotImplemented; - return autoPtr(NULL); + return autoPtr(nullptr); } diff --git a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceZoneSelection.H b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceZoneSelection.H index 08a3abee3..10b7f377e 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceZoneSelection.H +++ b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceZoneSelection.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -86,7 +86,7 @@ public: autoPtr clone() const { NotImplemented; - return autoPtr(NULL); + return autoPtr(nullptr); } diff --git a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/searchableSurfaceSelection.H b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/searchableSurfaceSelection.H index d5c04ae1e..30262ef8a 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/searchableSurfaceSelection.H +++ b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/searchableSurfaceSelection.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -79,7 +79,7 @@ public: autoPtr clone() const { NotImplemented; - return autoPtr(NULL); + return autoPtr(nullptr); } diff --git a/applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C b/applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C index cfe65a558..afbf8f557 100644 --- a/applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C +++ b/applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C @@ -43,7 +43,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io) IOobject::NO_WRITE ) ), - mirrorMeshPtr_(NULL) + mirrorMeshPtr_(nullptr) { plane mirrorPlane(mirrorMeshDict_); diff --git a/applications/utilities/mesh/manipulation/setSet/setSet.C b/applications/utilities/mesh/manipulation/setSet/setSet.C index 0feb0c3b7..cda9ec129 100644 --- a/applications/utilities/mesh/manipulation/setSet/setSet.C +++ b/applications/utilities/mesh/manipulation/setSet/setSet.C @@ -871,7 +871,7 @@ int main(int argc, char *argv[]) // Main command read & execute loop // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - autoPtr fileStreamPtr(NULL); + autoPtr fileStreamPtr(nullptr); if (batch) { diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C index cb7b4b5e8..bc9478264 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C +++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C @@ -680,7 +680,7 @@ int main(int argc, char *argv[]) new List*> ( mesh.nCells(), - static_cast*>(NULL) + static_cast*>(nullptr) ) ); @@ -947,7 +947,7 @@ int main(int argc, char *argv[]) if (times.size() == 1) { // Clear cached decomposer - fieldDecomposerList.set(proci, NULL); + fieldDecomposerList.set(proci, nullptr); } } @@ -978,7 +978,7 @@ int main(int argc, char *argv[]) if (times.size() == 1) { - dimFieldDecomposerList.set(proci, NULL); + dimFieldDecomposerList.set(proci, nullptr); } } @@ -1029,8 +1029,8 @@ int main(int argc, char *argv[]) if (times.size() == 1) { - pointProcAddressingList.set(proci, NULL); - pointFieldDecomposerList.set(proci, NULL); + pointProcAddressingList.set(proci, nullptr); + pointFieldDecomposerList.set(proci, nullptr); } } @@ -1133,11 +1133,11 @@ int main(int argc, char *argv[]) // times, otherwise it is just extra storage. if (times.size() == 1) { - boundaryProcAddressingList.set(proci, NULL); - cellProcAddressingList.set(proci, NULL); - faceProcAddressingList.set(proci, NULL); - procMeshList.set(proci, NULL); - processorDbList.set(proci, NULL); + boundaryProcAddressingList.set(proci, nullptr); + cellProcAddressingList.set(proci, nullptr); + faceProcAddressingList.set(proci, nullptr); + procMeshList.set(proci, nullptr); + processorDbList.set(proci, nullptr); } } } diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C index d54d25b38..3cad0f554 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C @@ -88,7 +88,7 @@ Foam::domainDecomposition::domainDecomposition(const IOobject& io) false ) ) - : NULL + : nullptr ), nProcs_ ( diff --git a/applications/utilities/parallelProcessing/decomposePar/pointFieldDecomposer.C b/applications/utilities/parallelProcessing/decomposePar/pointFieldDecomposer.C index 92b9a4c4e..77fcd6211 100644 --- a/applications/utilities/parallelProcessing/decomposePar/pointFieldDecomposer.C +++ b/applications/utilities/parallelProcessing/decomposePar/pointFieldDecomposer.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -89,7 +89,7 @@ Foam::pointFieldDecomposer::pointFieldDecomposer patchFieldDecomposerPtrs_ ( procMesh_.boundary().size(), - static_cast(NULL) + static_cast(nullptr) ) { forAll(boundaryAddressing_, patchi) diff --git a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C index fb3a22b74..6a97d2be5 100644 --- a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C +++ b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C @@ -227,7 +227,7 @@ autoPtr mergeSharedPoints if (returnReduce(pointToMaster.size(), sumOp