mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: noexcept for nullObject functions
STYLE: use nullObject for return values of NotImplemented STYLE: shallowCopy(nullptr) shortcut
This commit is contained in:
@ -135,14 +135,14 @@ public:
|
||||
virtual volScalarField& he()
|
||||
{
|
||||
NotImplemented;
|
||||
return thermo1_->he();
|
||||
return const_cast<volScalarField&>(volScalarField::null());
|
||||
}
|
||||
|
||||
//- Enthalpy/Internal energy [J/kg]
|
||||
virtual const volScalarField& he() const
|
||||
{
|
||||
NotImplemented;
|
||||
return thermo1_->he();
|
||||
return volScalarField::null();
|
||||
}
|
||||
|
||||
//- Enthalpy/Internal energy
|
||||
@ -213,7 +213,7 @@ public:
|
||||
) const
|
||||
{
|
||||
NotImplemented;
|
||||
return tmp<scalarField>::New(p);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//- Heat capacity at constant volume [J/kg/K]
|
||||
@ -236,7 +236,7 @@ public:
|
||||
) const
|
||||
{
|
||||
NotImplemented;
|
||||
return tmp<scalarField>::New(p);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//- Gamma = Cp/Cv []
|
||||
|
||||
@ -243,14 +243,14 @@ public:
|
||||
virtual volScalarField& he()
|
||||
{
|
||||
NotImplemented;
|
||||
return phases_[0].thermo().he();
|
||||
return const_cast<volScalarField&>(volScalarField::null());
|
||||
}
|
||||
|
||||
//- Enthalpy/Internal energy [J/kg]
|
||||
virtual const volScalarField& he() const
|
||||
{
|
||||
NotImplemented;
|
||||
return phases_[0].thermo().he();
|
||||
return volScalarField::null();
|
||||
}
|
||||
|
||||
//- Enthalpy/Internal energy
|
||||
@ -327,7 +327,7 @@ public:
|
||||
) const
|
||||
{
|
||||
NotImplemented;
|
||||
return tmp<scalarField>::New(p);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//- Heat capacity at constant volume [J/kg/K]
|
||||
@ -350,7 +350,7 @@ public:
|
||||
) const
|
||||
{
|
||||
NotImplemented;
|
||||
return tmp<scalarField>::New(p);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//- Gamma = Cp/Cv []
|
||||
|
||||
@ -86,14 +86,14 @@ public:
|
||||
virtual volScalarField& he()
|
||||
{
|
||||
NotImplemented;
|
||||
return p();
|
||||
return const_cast<volScalarField&>(volScalarField::null());
|
||||
}
|
||||
|
||||
//- Return access to the internal energy field [J/Kg]
|
||||
virtual const volScalarField& he() const
|
||||
{
|
||||
NotImplemented;
|
||||
return p();
|
||||
return volScalarField::null();
|
||||
}
|
||||
|
||||
//- Enthalpy/Internal energy
|
||||
@ -182,7 +182,7 @@ public:
|
||||
) const
|
||||
{
|
||||
NotImplemented;
|
||||
return tmp<scalarField>::New(p);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//- Return Cv of the mixture
|
||||
@ -205,7 +205,7 @@ public:
|
||||
) const
|
||||
{
|
||||
NotImplemented;
|
||||
return tmp<scalarField>::New(p);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//- Gamma = Cp/Cv []
|
||||
|
||||
Reference in New Issue
Block a user