From 6d85435f60e4fa94b1956ceb44c7dddd92c4b39b Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 20 Oct 2020 12:28:45 +0100 Subject: Remove BLOCKENTITY_PROTODEF --- src/BlockEntities/BlockEntity.h | 40 +--------------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) (limited to 'src/BlockEntities/BlockEntity.h') diff --git a/src/BlockEntities/BlockEntity.h b/src/BlockEntities/BlockEntity.h index c133c186c..3355cdf44 100644 --- a/src/BlockEntities/BlockEntity.h +++ b/src/BlockEntities/BlockEntity.h @@ -5,27 +5,6 @@ -/** Place this macro in the declaration of each cBlockEntity descendant. */ -#define BLOCKENTITY_PROTODEF(classname) \ - virtual bool IsA(const char * a_ClassName) const override \ - { \ - return ((a_ClassName != nullptr) && ((strcmp(a_ClassName, #classname) == 0) || Super::IsA(a_ClassName))); \ - } \ - virtual const char * GetClass() const override \ - { \ - return #classname; \ - } \ - static const char * GetClassStatic() \ - { \ - return #classname; \ - } \ - virtual const char * GetParentClass() const override \ - { \ - return Super::GetClass(); \ - } - - - class cChunk; @@ -56,6 +35,7 @@ protected: } public: + // tolua_end virtual ~cBlockEntity() {} // force a virtual destructor in all descendants @@ -93,20 +73,6 @@ public: Super::CopyFrom(a_Src) to copy the common ones. */ virtual void CopyFrom(const cBlockEntity & a_Src); - static const char * GetClassStatic() // Needed for ManualBindings's ForEach templates - { - return "cBlockEntity"; - } - - /** Returns true if the object is the specified class, or its descendant. */ - virtual bool IsA(const char * a_ClassName) const { return (strcmp(a_ClassName, "cBlockEntity") == 0); } - - /** Returns the name of the topmost class (the most descendant). Used for Lua bindings to push the correct object type. */ - virtual const char * GetClass() const { return GetClassStatic(); } - - /** Returns the name of the parent class, or empty string if no parent class. */ - virtual const char * GetParentClass() const { return ""; } - // tolua_begin // Position, in absolute block coordinates: @@ -163,7 +129,3 @@ protected: cWorld * m_World; } ; // tolua_export - - - - -- cgit v1.2.3