Removed nonew class modifier

This commit is contained in:
ZZYZX 2017-03-03 22:42:12 +02:00
commit 3a57a9809f
9 changed files with 7 additions and 41 deletions

View file

@ -5095,19 +5095,6 @@ FxExpression *FxNew::Resolve(FCompileContext &ctx)
return nullptr;
}
if (cls->ObjectFlags & OF_NoNew)
{
PClass* pcls = cls;
while (pcls && pcls->ParentClass && (pcls->ParentClass->ObjectFlags & OF_NoNew))
pcls = pcls->ParentClass;
if (pcls != ctx.Class)
{
ScriptPosition.Message(MSG_ERROR, "Cannot instantiate class %s directly", cls->TypeName.GetChars());
delete this;
return nullptr;
}
}
ValueType = NewPointer(cls);
}