1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-19 10:22:39 +01:00

Codechange: replace 'new PoolItem(...' with 'PoolItem::Create(...'

This commit is contained in:
Rubidium
2026-01-03 11:45:18 +01:00
committed by rubidium42
parent bc842811fc
commit 2fcd4e189a
49 changed files with 162 additions and 114 deletions

View File

@@ -85,7 +85,7 @@ std::tuple<CommandCost, GoalID> CmdCreateGoal(DoCommandFlags flags, CompanyID co
if (!Goal::IsValidGoalDestination(company, type, dest)) return { CMD_ERROR, GoalID::Invalid() };
if (flags.Test(DoCommandFlag::Execute)) {
Goal *g = new Goal(type, dest, company, text);
Goal *g = Goal::Create(type, dest, company, text);
if (g->company == CompanyID::Invalid()) {
InvalidateWindowClassesData(WC_GOALS_LIST);