fix: Operator Extension base class returns NULL on Clone() by default

pull/1/head
Thorsten Liebig 2012-05-11 10:45:44 +02:00
parent ac8ecb64c8
commit c4db77dd18
2 changed files with 2 additions and 8 deletions

View File

@ -34,16 +34,10 @@ Operator_Extension::Operator_Extension(Operator* op, Operator_Extension* op_ext)
{
UNUSED(op_ext);
m_Op = op;
m_Op_Cyl = dynamic_cast<Operator_Cylinder*>(op);
}
void Operator_Extension::ShowStat(ostream &ostr) const
{
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);
}

View File

@ -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)...
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;}