mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use FieldBase for template invariant parts
- use refCount instead of the tmp<...>::refCount alias
This commit is contained in:
@ -38,18 +38,11 @@ Foam::Function1<Type>::Function1(const word& entryName)
|
||||
template<class Type>
|
||||
Foam::Function1<Type>::Function1(const Function1<Type>& de)
|
||||
:
|
||||
tmp<Function1<Type>>::refCount(),
|
||||
refCount(),
|
||||
name_(de.name_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
Foam::Function1<Type>::~Function1()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
@ -111,8 +104,8 @@ Foam::FieldFunction1<Function1Type>::value
|
||||
const scalarField& x
|
||||
) const
|
||||
{
|
||||
tmp<Field<Type>> tfld(new Field<Type>(x.size()));
|
||||
Field<Type>& fld = tfld.ref();
|
||||
auto tfld = tmp<Field<Type>>::New(x.size());
|
||||
auto& fld = tfld.ref();
|
||||
|
||||
forAll(x, i)
|
||||
{
|
||||
@ -152,8 +145,8 @@ Foam::FieldFunction1<Function1Type>::integrate
|
||||
const scalarField& x2
|
||||
) const
|
||||
{
|
||||
tmp<Field<Type>> tfld(new Field<Type>(x1.size()));
|
||||
Field<Type>& fld = tfld.ref();
|
||||
auto tfld = tmp<Field<Type>>::New(x1.size());
|
||||
auto& fld = tfld.ref();
|
||||
|
||||
forAll(x1, i)
|
||||
{
|
||||
|
||||
@ -61,11 +61,11 @@ template<class Type> Ostream& operator<<(Ostream&, const Function1<Type>&);
|
||||
template<class Type>
|
||||
class Function1
|
||||
:
|
||||
public tmp<Function1<Type>>::refCount
|
||||
public refCount
|
||||
{
|
||||
// Private Member Functions
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
//- No copy assignment
|
||||
void operator=(const Function1<Type>&) = delete;
|
||||
|
||||
|
||||
@ -119,7 +119,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~Function1();
|
||||
virtual ~Function1() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
@ -194,8 +194,7 @@ public:
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~FieldFunction1()
|
||||
{}
|
||||
virtual ~FieldFunction1() = default;
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
Reference in New Issue
Block a user