From 90e21bc713118697e1013438d5b081d462f054e2 Mon Sep 17 00:00:00 2001 From: glx22 Date: Sun, 8 Jun 2025 22:34:04 +0200 Subject: [PATCH] Codechange: Remove useless SQConstruct parameters --- src/script/squirrel_helper.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/script/squirrel_helper.hpp b/src/script/squirrel_helper.hpp index 1820ff171a..f63351ddbf 100644 --- a/src/script/squirrel_helper.hpp +++ b/src/script/squirrel_helper.hpp @@ -187,9 +187,9 @@ namespace SQConvert { return SQCall(instance, func, vm, std::index_sequence_for{}); } - static Tcls *SQConstruct(Tcls *instance, Tretval(Tcls:: *func)(Targs...), HSQUIRRELVM vm) + static Tcls *SQConstruct(HSQUIRRELVM vm) { - return SQConstruct(instance, func, vm, std::index_sequence_for{}); + return SQConstruct(vm, std::index_sequence_for{}); } private: @@ -210,7 +210,7 @@ namespace SQConvert { } template - static Tcls *SQConstruct(Tcls *, Tretval(Tcls:: *)(Targs...), [[maybe_unused]] HSQUIRRELVM vm, std::index_sequence) + static Tcls *SQConstruct([[maybe_unused]] HSQUIRRELVM vm, std::index_sequence) { Tcls *inst = new Tcls( Param::Get(vm, 2 + i)... @@ -384,7 +384,7 @@ namespace SQConvert { int nparam = sq_gettop(vm); /* Create the real instance */ - Tcls *instance = HelperT::SQConstruct((Tcls *)nullptr, (Tmethod)nullptr, vm); + Tcls *instance = HelperT::SQConstruct(vm); sq_setinstanceup(vm, -nparam, instance); sq_setreleasehook(vm, -nparam, DefSQDestructorCallback); instance->AddRef();