1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-19 02:12:37 +01:00

Codechange: Get/pass ScriptStorage by reference instead of pointer.

This commit is contained in:
Peter Nelson
2025-07-14 17:01:43 +01:00
committed by Peter Nelson
parent 55098a2f2e
commit 9ce2aca949
3 changed files with 49 additions and 48 deletions

View File

@@ -318,9 +318,10 @@ void ScriptInstance::CollectGarbage()
}
ScriptStorage *ScriptInstance::GetStorage()
ScriptStorage &ScriptInstance::GetStorage()
{
return this->storage;
assert(this->storage != nullptr);
return *this->storage;
}
ScriptLogTypes::LogData &ScriptInstance::GetLogData()