ENH: coordinateSystem: fix cloning. See #863

This commit is contained in:
mattijs
2018-10-10 12:40:48 +01:00
parent 496e1cd0d2
commit 4645c841ca
4 changed files with 20 additions and 1 deletions

View File

@ -115,6 +115,12 @@ public:
// \param dictName If non-empty, the sub-dictionary to use. // \param dictName If non-empty, the sub-dictionary to use.
cartesian(const dictionary& dict, const word& dictName); cartesian(const dictionary& dict, const word& dictName);
//- Return clone
virtual autoPtr<coordinateSystem> clone() const
{
return autoPtr<coordinateSystem>::NewFrom<cartesian>(*this);
}
//- Destructor //- Destructor
virtual ~cartesian() = default; virtual ~cartesian() = default;

View File

@ -327,7 +327,7 @@ public:
//- Return clone //- Return clone
autoPtr<coordinateSystem> clone() const virtual autoPtr<coordinateSystem> clone() const
{ {
return autoPtr<coordinateSystem>::New(*this); return autoPtr<coordinateSystem>::New(*this);
} }

View File

@ -154,6 +154,13 @@ public:
// \param dictName If non-empty, the sub-dictionary to use. // \param dictName If non-empty, the sub-dictionary to use.
cylindrical(const dictionary& dict, const word& dictName); cylindrical(const dictionary& dict, const word& dictName);
//- Return clone
virtual autoPtr<coordinateSystem> clone() const
{
return autoPtr<coordinateSystem>::NewFrom<cylindrical>(*this);
}
//- Destructor //- Destructor
virtual ~cylindrical() = default; virtual ~cylindrical() = default;

View File

@ -141,6 +141,12 @@ public:
//- Construct from global lookup //- Construct from global lookup
indirect(const objectRegistry& obr, const dictionary& dict); indirect(const objectRegistry& obr, const dictionary& dict);
//- Return clone
virtual autoPtr<coordinateSystem> clone() const
{
return autoPtr<coordinateSystem>::NewFrom<indirect>(*this);
}
//- Destructor //- Destructor
virtual ~indirect() = default; virtual ~indirect() = default;