Codechange: Get/pass script controller by reference instead of pointer.

This commit is contained in:
Peter Nelson
2025-07-14 17:01:42 +01:00
committed by Peter Nelson
parent b2de1ff66f
commit 7ff0c67f77
2 changed files with 11 additions and 7 deletions

View File

@@ -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