mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-25 21:24:12 +01:00
Codechange: Pass Script engine by reference.
This commit is contained in:
committed by
Peter Nelson
parent
72ca962b84
commit
341cdbc16b
@@ -9,7 +9,7 @@
|
||||
|
||||
template <> SQInteger PushClassName<ScriptController, ScriptType::AI>(HSQUIRRELVM vm) { sq_pushstring(vm, "AIController", -1); return 1; }
|
||||
|
||||
void SQAIController_Register(Squirrel *engine)
|
||||
void SQAIController_Register(Squirrel &engine)
|
||||
{
|
||||
DefSQClass<ScriptController, ScriptType::AI> SQAIController("AIController");
|
||||
SQAIController.PreRegister(engine);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
template <> SQInteger PushClassName<ScriptController, ScriptType::GS>(HSQUIRRELVM vm) { sq_pushstring(vm, "GSController", -1); return 1; }
|
||||
|
||||
void SQGSController_Register(Squirrel *engine)
|
||||
void SQGSController_Register(Squirrel &engine)
|
||||
{
|
||||
DefSQClass<ScriptController, ScriptType::GS> SQGSController("GSController");
|
||||
SQGSController.PreRegister(engine);
|
||||
|
||||
@@ -21,7 +21,7 @@ static SQInteger ${APIUC}ObjectCloned(HSQUIRRELVM)
|
||||
throw Script_FatalError("This instance is not cloneable");
|
||||
}
|
||||
|
||||
void SQ${APIUC}_RegisterAll(Squirrel *engine)
|
||||
void SQ${APIUC}_RegisterAll(Squirrel &engine)
|
||||
{
|
||||
DefSQClass<ScriptObject, ScriptType::${APIUC}> SQ${APIUC}Object("${APIUC}Object");
|
||||
SQ${APIUC}Object.PreRegister(engine);
|
||||
|
||||
Reference in New Issue
Block a user