STYLE: use FieldBase for template invariant parts

- use refCount instead of the tmp<...>::refCount alias
This commit is contained in:
Mark Olesen
2018-05-16 18:03:14 +01:00
parent fe80e3b4ed
commit 46b768628c
33 changed files with 196 additions and 177 deletions

View File

@ -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)
{

View File

@ -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