ordered codes in _Object.h

This commit is contained in:
hyzboy 2024-08-08 01:42:28 +08:00
parent 65728a461a
commit cc4183ca55

View File

@ -24,9 +24,6 @@ namespace hgl
typedef void (_Object::*ObjectMemberFunc)(); typedef void (_Object::*ObjectMemberFunc)();
//此代码取自AngelScript感谢
#define GetMemberFuncPointer(c,m) MethodPtr<sizeof(void (c::*)())>::Convert((void (c::*)())(&c::m))
template <int> struct MethodPtr template <int> struct MethodPtr
{ {
template<class M> template<class M>
@ -41,4 +38,7 @@ namespace hgl
return ((u *)(&Mthd))->v; return ((u *)(&Mthd))->v;
} }
};//struct MethodPtr };//struct MethodPtr
//此代码取自AngelScript感谢
#define GetMemberFuncPointer(c,m) MethodPtr<sizeof(void (c::*)())>::Convert((void (c::*)())(&c::m))
}//namespace hgl }//namespace hgl