mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: more constness on const char* values
This commit is contained in:
@ -76,7 +76,8 @@ makeRemovablePatchTypeField
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
const char* ${typeName}FixedValueFvPatchScalarField::SHA1sum = "${SHA1sum}";
|
const char* const ${typeName}FixedValueFvPatchScalarField::SHA1sum =
|
||||||
|
"${SHA1sum}";
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -56,7 +56,7 @@ class ${typeName}FixedValueFvPatchScalarField
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
//- Information about the SHA1 of the code itself
|
//- Information about the SHA1 of the code itself
|
||||||
static const char* SHA1sum;
|
static const char* const SHA1sum;
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("${typeName}");
|
TypeName("${typeName}");
|
||||||
|
|||||||
@ -48,10 +48,10 @@ const Foam::word Foam::dynamicCode::codeTemplateEnvName
|
|||||||
const Foam::fileName Foam::dynamicCode::codeTemplateDirName
|
const Foam::fileName Foam::dynamicCode::codeTemplateDirName
|
||||||
= "codeTemplates/dynamicCode";
|
= "codeTemplates/dynamicCode";
|
||||||
|
|
||||||
const char* Foam::dynamicCode::libTargetRoot =
|
const char* const Foam::dynamicCode::libTargetRoot =
|
||||||
"LIB = $(PWD)/../platforms/$(WM_OPTIONS)/lib/lib";
|
"LIB = $(PWD)/../platforms/$(WM_OPTIONS)/lib/lib";
|
||||||
|
|
||||||
const char* Foam::dynamicCode::topDirName = "dynamicCode";
|
const char* const Foam::dynamicCode::topDirName = "dynamicCode";
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -106,10 +106,10 @@ protected:
|
|||||||
// Static data members
|
// Static data members
|
||||||
|
|
||||||
//- Root of the LIB target for Make/files
|
//- Root of the LIB target for Make/files
|
||||||
static const char* libTargetRoot;
|
static const char* const libTargetRoot;
|
||||||
|
|
||||||
//- Top-level directory name for copy/compiling
|
//- Top-level directory name for copy/compiling
|
||||||
static const char* topDirName;
|
static const char* const topDirName;
|
||||||
|
|
||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -32,7 +32,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
const char* Foam::constant::atomic::group = "atomic";
|
const char* const Foam::constant::atomic::group = "atomic";
|
||||||
|
|
||||||
|
|
||||||
const Foam::dimensionedScalar Foam::constant::atomic::alpha
|
const Foam::dimensionedScalar Foam::constant::atomic::alpha
|
||||||
@ -129,6 +129,3 @@ const Foam::dimensionedScalar Foam::constant::atomic::Eh
|
|||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -46,7 +46,7 @@ namespace atomic
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
//- Group name for atomic constants
|
//- Group name for atomic constants
|
||||||
extern const char* group;
|
extern const char* const group;
|
||||||
|
|
||||||
//- Fine-structure constant: default SI units: []
|
//- Fine-structure constant: default SI units: []
|
||||||
extern const dimensionedScalar alpha;
|
extern const dimensionedScalar alpha;
|
||||||
@ -75,6 +75,3 @@ namespace atomic
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -32,7 +32,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
const char* Foam::constant::electromagnetic::group = "electromagnetic";
|
const char* const Foam::constant::electromagnetic::group = "electromagnetic";
|
||||||
|
|
||||||
|
|
||||||
const Foam::dimensionedScalar Foam::constant::electromagnetic::mu0
|
const Foam::dimensionedScalar Foam::constant::electromagnetic::mu0
|
||||||
@ -164,5 +164,3 @@ const Foam::dimensionedScalar Foam::constant::electromagnetic::RK
|
|||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -46,7 +46,7 @@ namespace electromagnetic
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
//- Group name for electromagnetic constants
|
//- Group name for electromagnetic constants
|
||||||
extern const char* group;
|
extern const char* const group;
|
||||||
|
|
||||||
//- Magnetic constant/permeability of free space: default SI units: [H/m]
|
//- Magnetic constant/permeability of free space: default SI units: [H/m]
|
||||||
extern const dimensionedScalar mu0;
|
extern const dimensionedScalar mu0;
|
||||||
@ -84,5 +84,3 @@ namespace electromagnetic
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -45,7 +45,7 @@ namespace mathematical
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
static word group = "mathematical";
|
static const char* const group = "mathematical";
|
||||||
|
|
||||||
const scalar e(M_E);
|
const scalar e(M_E);
|
||||||
const scalar pi(M_PI);
|
const scalar pi(M_PI);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -32,7 +32,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
const char* Foam::constant::physicoChemical::group = "physicoChemical";
|
const char* const Foam::constant::physicoChemical::group = "physicoChemical";
|
||||||
|
|
||||||
|
|
||||||
const Foam::dimensionedScalar Foam::constant::physicoChemical::R
|
const Foam::dimensionedScalar Foam::constant::physicoChemical::R
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -46,7 +46,7 @@ namespace physicoChemical
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
//- Group name for physico-chemical constants
|
//- Group name for physico-chemical constants
|
||||||
extern const char* group;
|
extern const char* const group;
|
||||||
|
|
||||||
//- Universal gas constant: default SI units: [J/mol/K]
|
//- Universal gas constant: default SI units: [J/mol/K]
|
||||||
extern const dimensionedScalar R;
|
extern const dimensionedScalar R;
|
||||||
@ -78,7 +78,3 @@ namespace physicoChemical
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -30,7 +30,7 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
const char* Foam::constant::universal::group = "universal";
|
const char* const Foam::constant::universal::group = "universal";
|
||||||
|
|
||||||
|
|
||||||
const Foam::dimensionedScalar Foam::constant::universal::hr
|
const Foam::dimensionedScalar Foam::constant::universal::hr
|
||||||
@ -49,4 +49,3 @@ const Foam::dimensionedScalar Foam::constant::universal::hr
|
|||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -46,7 +46,7 @@ namespace universal
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
//- Group name for universal constants
|
//- Group name for universal constants
|
||||||
extern const char* group;
|
extern const char* const group;
|
||||||
|
|
||||||
//- Reduced Planck constant: default SI units: [J/s]
|
//- Reduced Planck constant: default SI units: [J/s]
|
||||||
extern const dimensionedScalar hr;
|
extern const dimensionedScalar hr;
|
||||||
@ -62,4 +62,3 @@ namespace universal
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -35,10 +35,10 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
const char* Foam::meshReaders::STARCD::defaultBoundaryName =
|
const char* const Foam::meshReaders::STARCD::defaultBoundaryName =
|
||||||
"Default_Boundary_Region";
|
"Default_Boundary_Region";
|
||||||
|
|
||||||
const char* Foam::meshReaders::STARCD::defaultSolidBoundaryName =
|
const char* const Foam::meshReaders::STARCD::defaultSolidBoundaryName =
|
||||||
"Default_Boundary_Solid";
|
"Default_Boundary_Solid";
|
||||||
|
|
||||||
bool Foam::meshReaders::STARCD::keepSolids = false;
|
bool Foam::meshReaders::STARCD::keepSolids = false;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -68,8 +68,8 @@ protected:
|
|||||||
|
|
||||||
// Protected Data
|
// Protected Data
|
||||||
|
|
||||||
static const char* defaultBoundaryName;
|
static const char* const defaultBoundaryName;
|
||||||
static const char* defaultSolidBoundaryName;
|
static const char* const defaultSolidBoundaryName;
|
||||||
|
|
||||||
//- Face addressing from pro-STAR faces -> OpenFOAM faces
|
//- Face addressing from pro-STAR faces -> OpenFOAM faces
|
||||||
static const int starToFoamFaceAddr[4][6];
|
static const int starToFoamFaceAddr[4][6];
|
||||||
|
|||||||
Reference in New Issue
Block a user