1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-24 04:34:16 +01:00

Codechange: Remove CCountedPtr.

This was originally generic and used by YAPF, but now it is used only by script objects.

CCountedPtr provided much more (untested) functionality than used.

ScriptObjectRef already exists for script objects and does the same thing, so use this instead.
This commit is contained in:
Peter Nelson
2024-10-16 00:16:43 +01:00
committed by Peter Nelson
parent d8029b1d84
commit 8360fab18a
18 changed files with 66 additions and 282 deletions

View File

@@ -247,7 +247,7 @@
/* static */ bool ScriptVehicle::SetName(VehicleID vehicle_id, Text *name)
{
CCountedPtr<Text> counter(name);
ScriptObjectRef counter(name);
EnforceCompanyModeValid(false);
EnforcePrecondition(false, IsPrimaryVehicle(vehicle_id));