mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-19 07:00:52 +00:00
- 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
This commit is contained in:
parent
b31f284e28
commit
f3ae61a2d3
2 changed files with 3 additions and 15 deletions
|
@ -62,7 +62,6 @@ ClassReg DObject::RegistrationInfo =
|
||||||
&DObject::InPlaceConstructor, // ConstructNative
|
&DObject::InPlaceConstructor, // ConstructNative
|
||||||
nullptr,
|
nullptr,
|
||||||
sizeof(DObject), // SizeOf
|
sizeof(DObject), // SizeOf
|
||||||
CLASSREG_PClass, // MetaClassNum
|
|
||||||
};
|
};
|
||||||
_DECLARE_TI(DObject)
|
_DECLARE_TI(DObject)
|
||||||
|
|
||||||
|
|
|
@ -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
|
#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()
|
// Enumerations for the meta classes created by ClassReg::RegisterClass()
|
||||||
enum
|
|
||||||
{
|
|
||||||
CLASSREG_PClass,
|
|
||||||
CLASSREG_PClassActor,
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ClassReg
|
struct ClassReg
|
||||||
{
|
{
|
||||||
PClass *MyClass;
|
PClass *MyClass;
|
||||||
|
@ -103,8 +97,7 @@ struct ClassReg
|
||||||
const size_t *Pointers;
|
const size_t *Pointers;
|
||||||
void (*ConstructNative)(void *);
|
void (*ConstructNative)(void *);
|
||||||
void(*InitNatives)();
|
void(*InitNatives)();
|
||||||
unsigned int SizeOf:28;
|
unsigned int SizeOf;
|
||||||
unsigned int MetaClassNum:4;
|
|
||||||
|
|
||||||
PClass *RegisterClass();
|
PClass *RegisterClass();
|
||||||
void SetupClass(PClass *cls);
|
void SetupClass(PClass *cls);
|
||||||
|
@ -124,9 +117,7 @@ private: \
|
||||||
DECLARE_ABSTRACT_CLASS(cls,parent) \
|
DECLARE_ABSTRACT_CLASS(cls,parent) \
|
||||||
public: \
|
public: \
|
||||||
typedef meta MetaClass; \
|
typedef meta MetaClass; \
|
||||||
MetaClass *GetClass() const { return static_cast<MetaClass *>(DObject::GetClass()); } \
|
MetaClass *GetClass() const { return static_cast<MetaClass *>(DObject::GetClass()); }
|
||||||
protected: \
|
|
||||||
enum { MetaClassNum = CLASSREG_##meta }; private: \
|
|
||||||
|
|
||||||
#define DECLARE_CLASS(cls,parent) \
|
#define DECLARE_CLASS(cls,parent) \
|
||||||
DECLARE_ABSTRACT_CLASS(cls,parent) \
|
DECLARE_ABSTRACT_CLASS(cls,parent) \
|
||||||
|
@ -155,8 +146,7 @@ protected: \
|
||||||
ptrs, \
|
ptrs, \
|
||||||
create, \
|
create, \
|
||||||
nullptr, \
|
nullptr, \
|
||||||
sizeof(cls), \
|
sizeof(cls) }; \
|
||||||
cls::MetaClassNum }; \
|
|
||||||
_DECLARE_TI(cls) \
|
_DECLARE_TI(cls) \
|
||||||
PClass *cls::StaticType() const { return RegistrationInfo.MyClass; }
|
PClass *cls::StaticType() const { return RegistrationInfo.MyClass; }
|
||||||
|
|
||||||
|
@ -197,7 +187,6 @@ public:
|
||||||
private:
|
private:
|
||||||
typedef DObject ThisClass;
|
typedef DObject ThisClass;
|
||||||
protected:
|
protected:
|
||||||
enum { MetaClassNum = CLASSREG_PClass };
|
|
||||||
|
|
||||||
// Per-instance variables. There are four.
|
// Per-instance variables. There are four.
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
|
Loading…
Reference in a new issue