1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2024-11-08 00:37:15 +01:00

Make it generic.

This commit is contained in:
Sandu Liviu Catalin 2021-01-30 20:10:09 +02:00
parent 4e1b3cd369
commit d7ce51d8bb
2 changed files with 6 additions and 6 deletions

View File

@ -358,10 +358,10 @@ struct LightObj {
/// Retrieves type-tag of the managed object
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AbstractStaticClassData * GetTypeTag() const {
AbstractStaticClassData* typeTag;
SQUserPointer GetTypeTag() {
SQUserPointer typeTag;
sq_pushobject(SqVM(), GetObj());
sq_gettypetag(SqVM(), -1, (SQUserPointer*)&typeTag);
sq_gettypetag(SqVM(), -1, &typeTag);
sq_pop(SqVM(), 1);
return typeTag;
}

View File

@ -372,10 +372,10 @@ public:
/// Retrieves the type-tag of the managed object
///
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AbstractStaticClassData * GetTypeTag() const {
AbstractStaticClassData* typeTag;
SQUserPointer GetTypeTag() {
SQUserPointer typeTag;
sq_pushobject(SqVM(), GetObj());
sq_gettypetag(SqVM(), -1, (SQUserPointer*)&typeTag);
sq_gettypetag(SqVM(), -1, &typeTag);
sq_pop(SqVM(), 1);
return typeTag;
}