diff --git a/src/dobjtype.cpp b/src/dobjtype.cpp index 1d781c02c..11fd04e82 100644 --- a/src/dobjtype.cpp +++ b/src/dobjtype.cpp @@ -3374,27 +3374,6 @@ PClass *PClass::CreateDerivedClass(FName name, unsigned int size) return type; } -//========================================================================== -// -// PClass :: Extend -// -// Add 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 diff --git a/src/dobjtype.h b/src/dobjtype.h index 5ad5757f3..679804566 100644 --- a/src/dobjtype.h +++ b/src/dobjtype.h @@ -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();