Use unique_ptr and initialiser init for OrderExtraInfo.

This commit is contained in:
Jonathan G Rennison
2016-09-05 01:36:55 +01:00
parent e90b266af1
commit f8f8e642dc
3 changed files with 13 additions and 21 deletions

View File

@@ -209,9 +209,9 @@ void Save_ORDX()
Order *order;
FOR_ALL_ORDERS(order) {
if (order->extra != NULL) {
if (order->extra) {
SlSetArrayIndex(order->index);
SlObject(order->extra, GetOrderExtraInfoDescription());
SlObject(order->extra.get(), GetOrderExtraInfoDescription());
}
}
}
@@ -223,7 +223,7 @@ void Load_ORDX()
Order *order = Order::GetIfValid(index);
assert(order != NULL);
order->AllocExtraInfo();
SlObject(order->extra, GetOrderExtraInfoDescription());
SlObject(order->extra.get(), GetOrderExtraInfoDescription());
}
}