diff options
Diffstat (limited to 'src/script/api/template/template_engine.hpp.sq')
-rw-r--r-- | src/script/api/template/template_engine.hpp.sq | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/api/template/template_engine.hpp.sq b/src/script/api/template/template_engine.hpp.sq index 3d652df9e..6aa13a94e 100644 --- a/src/script/api/template/template_engine.hpp.sq +++ b/src/script/api/template/template_engine.hpp.sq @@ -17,5 +17,5 @@ namespace SQConvert { template <> inline ScriptEngine &GetParam(ForceType<ScriptEngine &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEngine *)instance; } template <> inline const ScriptEngine *GetParam(ForceType<const ScriptEngine *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptEngine *)instance; } template <> inline const ScriptEngine &GetParam(ForceType<const ScriptEngine &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(ScriptEngine *)instance; } - template <> inline int Return<ScriptEngine *>(HSQUIRRELVM vm, ScriptEngine *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Engine", res, NULL, DefSQDestructorCallback<ScriptEngine>, true); return 1; } + template <> inline int Return<ScriptEngine *>(HSQUIRRELVM vm, ScriptEngine *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "Engine", res, nullptr, DefSQDestructorCallback<ScriptEngine>, true); return 1; } } // namespace SQConvert |