From c7300716f630d43b77c2787290682213846651a7 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Wed, 18 Jan 2017 21:45:26 +0000 Subject: [PATCH] Updates for clang++-3.9 --- src/conversion/ensight/part/ensightPartCells.C | 8 +++++--- src/conversion/ensight/part/ensightPartCells.H | 4 +++- .../edgeFaceCirculator/edgeFaceCirculator.C | 15 +++++++++------ .../edgeFaceCirculator/edgeFaceCirculator.H | 5 ++++- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/src/conversion/ensight/part/ensightPartCells.C b/src/conversion/ensight/part/ensightPartCells.C index 82ef148e03..dbf421539b 100644 --- a/src/conversion/ensight/part/ensightPartCells.C +++ b/src/conversion/ensight/part/ensightPartCells.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -38,6 +38,8 @@ namespace Foam addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream); } +const Foam::polyMesh* const Foam::ensightPartCells::polyMeshNullPtr_ = nullptr; + const Foam::List Foam::ensightPartCells::elemTypes_ ( IStringStream @@ -182,7 +184,7 @@ Foam::ensightPartCells::ensightPartCells ) : ensightPart(partNumber, partDescription), - mesh_(*reinterpret_cast(0)) + mesh_(*polyMeshNullPtr_) {} @@ -237,7 +239,7 @@ Foam::ensightPartCells::ensightPartCells(const ensightPartCells& part) Foam::ensightPartCells::ensightPartCells(Istream& is) : ensightPart(), - mesh_(*reinterpret_cast(0)) + mesh_(*polyMeshNullPtr_) { reconstruct(is); } diff --git a/src/conversion/ensight/part/ensightPartCells.H b/src/conversion/ensight/part/ensightPartCells.H index d1b3bcb72d..6a937abeba 100644 --- a/src/conversion/ensight/part/ensightPartCells.H +++ b/src/conversion/ensight/part/ensightPartCells.H @@ -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-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -94,6 +94,8 @@ protected: // Static data members + static const polyMesh* const polyMeshNullPtr_; + static const List elemTypes_; diff --git a/src/meshTools/edgeFaceCirculator/edgeFaceCirculator.C b/src/meshTools/edgeFaceCirculator/edgeFaceCirculator.C index 9149eaf920..5431bb419f 100644 --- a/src/meshTools/edgeFaceCirculator/edgeFaceCirculator.C +++ b/src/meshTools/edgeFaceCirculator/edgeFaceCirculator.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,13 +28,16 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // +const Foam::primitiveMesh* const Foam::edgeFaceCirculator::endConstIterMeshPtr + = nullptr; + const Foam::edgeFaceCirculator Foam::edgeFaceCirculator::endConstIter ( - *reinterpret_cast(0), // primitiveMesh - -1, // faceLabel - false, // ownerSide - -1, // index - false // isBoundaryEdge + *Foam::edgeFaceCirculator::endConstIterMeshPtr, // primitiveMesh + -1, // faceLabel + false, // ownerSide + -1, // index + false // isBoundaryEdge ); diff --git a/src/meshTools/edgeFaceCirculator/edgeFaceCirculator.H b/src/meshTools/edgeFaceCirculator/edgeFaceCirculator.H index 8aa85d978b..c9b8ac0708 100644 --- a/src/meshTools/edgeFaceCirculator/edgeFaceCirculator.H +++ b/src/meshTools/edgeFaceCirculator/edgeFaceCirculator.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -88,6 +88,9 @@ class edgeFaceCirculator { // Static data members + //- End iterator primitiveMesh nullptr + static const primitiveMesh* const endConstIterMeshPtr; + //- End iterator static const edgeFaceCirculator endConstIter;