Remove PClass::Extend()

This commit is contained in:
Randy Heit 2016-04-03 16:25:08 -05:00
parent 85c8218441
commit 15208188de
2 changed files with 0 additions and 23 deletions

View File

@ -3374,27 +3374,6 @@ PClass *PClass::CreateDerivedClass(FName name, unsigned int size)
return type;
}
//==========================================================================
//
// PClass :: Extend
//
// Add <extension> bytes to the end of this class and possibly more to meet
// alignment restrictions. Returns the start of the extended block.
//
//==========================================================================
unsigned int PClass::Extend(unsigned int extension, unsigned int alignment)
{
assert(this->bRuntimeClass);
unsigned int oldsize = Size;
unsigned int padto = (oldsize + alignment - 1) & ~(alignment - 1);
Size = padto + extension;
Defaults = (BYTE *)M_Realloc(Defaults, Size);
memset(Defaults + oldsize, 0, Size - oldsize);
return padto;
}
//==========================================================================
//
// PClass :: AddField

View File

@ -725,8 +725,6 @@ public:
void InsertIntoHash();
DObject *CreateNew() const;
PClass *CreateDerivedClass(FName name, unsigned int size);
unsigned int Extend(unsigned int extension, unsigned int alignment);
unsigned int Extend(const PType *type) { return Extend(type->Size, type->Align); }
PField *AddField(FName name, PType *type, DWORD flags=0) override;
void InitializeActorInfo();
void BuildFlatPointers();