mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: use factory Clone method for handling member clone() methods
- reduces code clutter, simplifies modification for new types.
Handled classes:
Function1, PatchFunction1, coordinateRotation, coordinateSystem,
particle, liquidProperties, solidProperties
This commit is contained in:
committed by
Andrew Heather
parent
39e054b0b8
commit
987dbe4589
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017 OpenFOAM Foundation
|
||||
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2024 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -72,8 +72,8 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef Function1Types_Scale_H
|
||||
#define Function1Types_Scale_H
|
||||
#ifndef Foam_Function1Types_Scale_H
|
||||
#define Foam_Function1Types_Scale_H
|
||||
|
||||
#include "Function1.H"
|
||||
|
||||
@ -133,10 +133,10 @@ public:
|
||||
//- Copy construct
|
||||
explicit Scale(const Scale<Type>& rhs);
|
||||
|
||||
//- Construct and return a clone
|
||||
//- Return a clone
|
||||
virtual tmp<Function1<Type>> clone() const
|
||||
{
|
||||
return tmp<Function1<Type>>(new Scale<Type>(*this));
|
||||
return Function1<Type>::Clone(*this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user