Codechange: Get/pass engine by reference instead of pointer.
This commit is contained in:
committed by
Peter Nelson
parent
7ff0c67f77
commit
55098a2f2e
@@ -82,20 +82,20 @@ SQInteger SquirrelStd::notifyallexceptions(HSQUIRRELVM vm)
|
||||
return SQ_ERROR;
|
||||
}
|
||||
|
||||
void squirrel_register_global_std(Squirrel *engine)
|
||||
void squirrel_register_global_std(Squirrel &engine)
|
||||
{
|
||||
/* We don't use squirrel_helper here, as we want to register to the global
|
||||
* scope and not to a class. */
|
||||
engine->AddMethod("require", &SquirrelStd::require, ".s");
|
||||
engine->AddMethod("notifyallexceptions", &SquirrelStd::notifyallexceptions, ".b");
|
||||
engine.AddMethod("require", &SquirrelStd::require, ".s");
|
||||
engine.AddMethod("notifyallexceptions", &SquirrelStd::notifyallexceptions, ".b");
|
||||
}
|
||||
|
||||
void squirrel_register_std(Squirrel *engine)
|
||||
void squirrel_register_std(Squirrel &engine)
|
||||
{
|
||||
/* We don't use squirrel_helper here, as we want to register to the global
|
||||
* scope and not to a class. */
|
||||
engine->AddMethod("min", &SquirrelStd::min, ".ii");
|
||||
engine->AddMethod("max", &SquirrelStd::max, ".ii");
|
||||
engine.AddMethod("min", &SquirrelStd::min, ".ii");
|
||||
engine.AddMethod("max", &SquirrelStd::max, ".ii");
|
||||
|
||||
sqstd_register_mathlib(engine->GetVM());
|
||||
sqstd_register_mathlib(engine.GetVM());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user