Codechange: Remove Company/OwnerByte types

This commit is contained in:
Charles Pigott
2019-04-22 09:10:04 +01:00
committed by PeterN
parent fcf06ba4c4
commit 5b34c8019f
37 changed files with 86 additions and 89 deletions

View File

@@ -223,7 +223,7 @@ CommandCost CmdChangeBankBalance(TileIndex tile, DoCommandFlag flags, uint32 p1,
if (flags & DC_EXEC) {
/* Change company bank balance of company. */
Backup<CompanyByte> cur_company(_current_company, company, FILE_LINE);
Backup<CompanyID> cur_company(_current_company, company, FILE_LINE);
SubtractMoneyFromCompany(CommandCost(expenses_type, -delta));
cur_company.Restore();
}
@@ -259,7 +259,7 @@ CommandCost CmdGiveMoney(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
if (flags & DC_EXEC) {
/* Add money to company */
Backup<CompanyByte> cur_company(_current_company, dest_company, FILE_LINE);
Backup<CompanyID> cur_company(_current_company, dest_company, FILE_LINE);
SubtractMoneyFromCompany(CommandCost(EXPENSES_OTHER, -amount.GetCost()));
cur_company.Restore();
}