1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-16 00:42:45 +01:00

Codechange: Manage script event queue using smart pointers.

This commit is contained in:
frosch
2025-04-18 18:03:14 +02:00
committed by frosch
parent b9f4ef3d78
commit 0d4588688f
5 changed files with 32 additions and 56 deletions

View File

@@ -33,11 +33,7 @@
#include "../safeguards.h"
ScriptStorage::ScriptStorage() = default;
ScriptStorage::~ScriptStorage()
{
/* Free our pointers */
if (event_data != nullptr) ScriptEventController::FreeEventPointer();
}
ScriptStorage::~ScriptStorage() = default;
/**
* Callback called by squirrel when a script uses "print" and for error messages.