fix: Operator Extension base class returns NULL on Clone() by default
parent
ac8ecb64c8
commit
c4db77dd18
|
@ -34,16 +34,10 @@ Operator_Extension::Operator_Extension(Operator* op, Operator_Extension* op_ext)
|
||||||
{
|
{
|
||||||
UNUSED(op_ext);
|
UNUSED(op_ext);
|
||||||
m_Op = op;
|
m_Op = op;
|
||||||
|
m_Op_Cyl = dynamic_cast<Operator_Cylinder*>(op);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Operator_Extension::ShowStat(ostream &ostr) const
|
void Operator_Extension::ShowStat(ostream &ostr) const
|
||||||
{
|
{
|
||||||
ostr << "--- " << GetExtensionName() << " ---" << endl;
|
ostr << "--- " << GetExtensionName() << " ---" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
Operator_Extension* Operator_Extension::Clone(Operator* op)
|
|
||||||
{
|
|
||||||
if (dynamic_cast<Operator_Extension*>(this)==NULL)
|
|
||||||
return NULL;
|
|
||||||
return new Operator_Extension(op, this);
|
|
||||||
}
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ public:
|
||||||
Create a clone of this extension, will return NULL if this is impossible (e.g. derived extension has no clone method and copy-constructor)...
|
Create a clone of this extension, will return NULL if this is impossible (e.g. derived extension has no clone method and copy-constructor)...
|
||||||
BuildExtension has to be called separatly!
|
BuildExtension has to be called separatly!
|
||||||
*/
|
*/
|
||||||
virtual Operator_Extension* Clone(Operator* op);
|
virtual Operator_Extension* Clone(Operator* op) {return NULL;}
|
||||||
|
|
||||||
virtual bool BuildExtension() {return true;}
|
virtual bool BuildExtension() {return true;}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue