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