Codechange: Get/pass script controller by reference instead of pointer.
This commit is contained in:
committed by
Peter Nelson
parent
b2de1ff66f
commit
7ff0c67f77
@@ -146,7 +146,11 @@ public:
|
||||
/**
|
||||
* Get the controller attached to the instance.
|
||||
*/
|
||||
class ScriptController *GetController() { return controller; }
|
||||
class ScriptController &GetController()
|
||||
{
|
||||
assert(this->controller != nullptr);
|
||||
return *this->controller;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the "this script died" value
|
||||
|
||||
Reference in New Issue
Block a user