mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-24 12:06:41 +00:00
Codechange: replace 'new PoolItem(...' with 'PoolItem::Create(...'
This commit is contained in:
@@ -57,7 +57,7 @@ void OrderBackup::DoRestore(Vehicle *v)
|
||||
if (this->clone != nullptr) {
|
||||
Command<CMD_CLONE_ORDER>::Do(DoCommandFlag::Execute, CO_SHARE, v->index, this->clone->index);
|
||||
} else if (!this->orders.empty() && OrderList::CanAllocateItem()) {
|
||||
v->orders = new OrderList(std::move(this->orders), v);
|
||||
v->orders = OrderList::Create(std::move(this->orders), v);
|
||||
/* Make sure buoys/oil rigs are updated in the station list. */
|
||||
InvalidateWindowClassesData(WC_STATION_LIST, 0);
|
||||
}
|
||||
@@ -89,7 +89,7 @@ void OrderBackup::DoRestore(Vehicle *v)
|
||||
if (ob->user == user) delete ob;
|
||||
}
|
||||
if (OrderBackup::CanAllocateItem()) {
|
||||
new OrderBackup(v, user);
|
||||
OrderBackup::Create(v, user);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user