From f3ae61a2d3ccadc8991077c4d3cdd03f0f8db6aa Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 27 Dec 2018 08:49:34 +0100 Subject: [PATCH] - remove some obsolete bit of cruft from the class type system. This was a remnant of putting the meta data directly into the class descriptor which turned out to be an unworkable approach --- src/dobject.cpp | 1 - src/dobject.h | 17 +++-------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/dobject.cpp b/src/dobject.cpp index f5fd176f8..783272096 100644 --- a/src/dobject.cpp +++ b/src/dobject.cpp @@ -62,7 +62,6 @@ ClassReg DObject::RegistrationInfo = &DObject::InPlaceConstructor, // ConstructNative nullptr, sizeof(DObject), // SizeOf - CLASSREG_PClass, // MetaClassNum }; _DECLARE_TI(DObject) diff --git a/src/dobject.h b/src/dobject.h index c930cbe79..8632ec1dd 100644 --- a/src/dobject.h +++ b/src/dobject.h @@ -88,12 +88,6 @@ class PClassActor; #define NATIVE_TYPE(object) (object->StaticType()) // Passed an object, returns the type of the C++ class representing the object // Enumerations for the meta classes created by ClassReg::RegisterClass() -enum -{ - CLASSREG_PClass, - CLASSREG_PClassActor, -}; - struct ClassReg { PClass *MyClass; @@ -103,8 +97,7 @@ struct ClassReg const size_t *Pointers; void (*ConstructNative)(void *); void(*InitNatives)(); - unsigned int SizeOf:28; - unsigned int MetaClassNum:4; + unsigned int SizeOf; PClass *RegisterClass(); void SetupClass(PClass *cls); @@ -124,9 +117,7 @@ private: \ DECLARE_ABSTRACT_CLASS(cls,parent) \ public: \ typedef meta MetaClass; \ - MetaClass *GetClass() const { return static_cast(DObject::GetClass()); } \ -protected: \ - enum { MetaClassNum = CLASSREG_##meta }; private: \ + MetaClass *GetClass() const { return static_cast(DObject::GetClass()); } #define DECLARE_CLASS(cls,parent) \ DECLARE_ABSTRACT_CLASS(cls,parent) \ @@ -155,8 +146,7 @@ protected: \ ptrs, \ create, \ nullptr, \ - sizeof(cls), \ - cls::MetaClassNum }; \ + sizeof(cls) }; \ _DECLARE_TI(cls) \ PClass *cls::StaticType() const { return RegistrationInfo.MyClass; } @@ -197,7 +187,6 @@ public: private: typedef DObject ThisClass; protected: - enum { MetaClassNum = CLASSREG_PClass }; // Per-instance variables. There are four. #ifndef NDEBUG