ordered codes in _Object.h
This commit is contained in:
parent
65728a461a
commit
cc4183ca55
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user