STYLE: more constness on const char* values

This commit is contained in:
Mark Olesen
2011-03-11 09:08:45 +01:00
parent fd6695d329
commit 12d965ead9
15 changed files with 31 additions and 46 deletions

View File

@ -76,7 +76,8 @@ makeRemovablePatchTypeField
);
const char* ${typeName}FixedValueFvPatchScalarField::SHA1sum = "${SHA1sum}";
const char* const ${typeName}FixedValueFvPatchScalarField::SHA1sum =
"${SHA1sum}";
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -56,7 +56,7 @@ class ${typeName}FixedValueFvPatchScalarField
public:
//- Information about the SHA1 of the code itself
static const char* SHA1sum;
static const char* const SHA1sum;
//- Runtime type information
TypeName("${typeName}");

View File

@ -48,10 +48,10 @@ const Foam::word Foam::dynamicCode::codeTemplateEnvName
const Foam::fileName Foam::dynamicCode::codeTemplateDirName
= "codeTemplates/dynamicCode";
const char* Foam::dynamicCode::libTargetRoot =
const char* const Foam::dynamicCode::libTargetRoot =
"LIB = $(PWD)/../platforms/$(WM_OPTIONS)/lib/lib";
const char* Foam::dynamicCode::topDirName = "dynamicCode";
const char* const Foam::dynamicCode::topDirName = "dynamicCode";
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //

View File

@ -106,10 +106,10 @@ protected:
// Static data members
//- Root of the LIB target for Make/files
static const char* libTargetRoot;
static const char* const libTargetRoot;
//- Top-level directory name for copy/compiling
static const char* topDirName;
static const char* const topDirName;
// Protected Member Functions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
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
@ -129,6 +129,3 @@ const Foam::dimensionedScalar Foam::constant::atomic::Eh
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -46,7 +46,7 @@ namespace atomic
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//- Group name for atomic constants
extern const char* group;
extern const char* const group;
//- Fine-structure constant: default SI units: []
extern const dimensionedScalar alpha;
@ -75,6 +75,3 @@ namespace atomic
#endif
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
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
@ -164,5 +164,3 @@ const Foam::dimensionedScalar Foam::constant::electromagnetic::RK
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -46,7 +46,7 @@ namespace electromagnetic
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//- 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]
extern const dimensionedScalar mu0;
@ -84,5 +84,3 @@ namespace electromagnetic
#endif
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -45,7 +45,7 @@ namespace mathematical
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
static word group = "mathematical";
static const char* const group = "mathematical";
const scalar e(M_E);
const scalar pi(M_PI);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -46,7 +46,7 @@ namespace physicoChemical
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//- Group name for physico-chemical constants
extern const char* group;
extern const char* const group;
//- Universal gas constant: default SI units: [J/mol/K]
extern const dimensionedScalar R;
@ -78,7 +78,3 @@ namespace physicoChemical
#endif
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
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
@ -49,4 +49,3 @@ const Foam::dimensionedScalar Foam::constant::universal::hr
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -46,7 +46,7 @@ namespace universal
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//- Group name for universal constants
extern const char* group;
extern const char* const group;
//- Reduced Planck constant: default SI units: [J/s]
extern const dimensionedScalar hr;
@ -62,4 +62,3 @@ namespace universal
#endif
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -35,10 +35,10 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
const char* Foam::meshReaders::STARCD::defaultBoundaryName =
const char* const Foam::meshReaders::STARCD::defaultBoundaryName =
"Default_Boundary_Region";
const char* Foam::meshReaders::STARCD::defaultSolidBoundaryName =
const char* const Foam::meshReaders::STARCD::defaultSolidBoundaryName =
"Default_Boundary_Solid";
bool Foam::meshReaders::STARCD::keepSolids = false;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -68,8 +68,8 @@ protected:
// Protected Data
static const char* defaultBoundaryName;
static const char* defaultSolidBoundaryName;
static const char* const defaultBoundaryName;
static const char* const defaultSolidBoundaryName;
//- Face addressing from pro-STAR faces -> OpenFOAM faces
static const int starToFoamFaceAddr[4][6];