mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: DimensionedField, GeometricField enhancements and style changes
- constCast() convenience methods. This simplies coding in places, especially in solvers - inline some methods within headers, for better overview/maintenance - only set DimensionedField default value on construct if not read - storeOldTimes() does not require const_cast
This commit is contained in:
@ -135,7 +135,7 @@ public:
|
||||
virtual volScalarField& he()
|
||||
{
|
||||
NotImplemented;
|
||||
return const_cast<volScalarField&>(volScalarField::null());
|
||||
return volScalarField::null().constCast();
|
||||
}
|
||||
|
||||
//- Enthalpy/Internal energy [J/kg]
|
||||
|
||||
@ -243,7 +243,7 @@ public:
|
||||
virtual volScalarField& he()
|
||||
{
|
||||
NotImplemented;
|
||||
return const_cast<volScalarField&>(volScalarField::null());
|
||||
return volScalarField::null().constCast();
|
||||
}
|
||||
|
||||
//- Enthalpy/Internal energy [J/kg]
|
||||
|
||||
@ -86,7 +86,7 @@ public:
|
||||
virtual volScalarField& he()
|
||||
{
|
||||
NotImplemented;
|
||||
return const_cast<volScalarField&>(volScalarField::null());
|
||||
return volScalarField::null().constCast();
|
||||
}
|
||||
|
||||
//- Return access to the internal energy field [J/Kg]
|
||||
|
||||
Reference in New Issue
Block a user