summaryrefslogtreecommitdiff
path: root/src/town_cmd.cpp
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2019-04-22 09:10:04 +0100
committerPeterN <peter@fuzzle.org>2019-04-29 17:40:22 +0100
commit5b34c8019f135afd9f20d043a489ab96f286038a (patch)
tree84b38701d78f2348ad1e54c5cb379fc15bdcfe67 /src/town_cmd.cpp
parentfcf06ba4c43bb9b7ac0b8541377a5240b3e01126 (diff)
downloadopenttd-5b34c8019f135afd9f20d043a489ab96f286038a.tar.xz
Codechange: Remove Company/OwnerByte types
Diffstat (limited to 'src/town_cmd.cpp')
-rw-r--r--src/town_cmd.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index ef87d82c5..f3acfb4a3 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -599,7 +599,7 @@ static void TileLoop_Town(TileIndex tile)
}
}
- Backup<CompanyByte> cur_company(_current_company, OWNER_TOWN, FILE_LINE);
+ Backup<CompanyID> cur_company(_current_company, OWNER_TOWN, FILE_LINE);
if ((hs->building_flags & BUILDING_HAS_1_TILE) &&
HasBit(t->flags, TOWN_IS_GROWING) &&
@@ -1566,7 +1566,7 @@ static bool GrowTown(Town *t)
};
/* Current "company" is a town */
- Backup<CompanyByte> cur_company(_current_company, OWNER_TOWN, FILE_LINE);
+ Backup<CompanyID> cur_company(_current_company, OWNER_TOWN, FILE_LINE);
TileIndex tile = t->xy; // The tile we are working with ATM
@@ -2042,7 +2042,7 @@ static Town *CreateRandomTown(uint attempts, uint32 townnameparts, TownSize size
* placement is so bad it couldn't grow at all */
if (t->cache.population > 0) return t;
- Backup<CompanyByte> cur_company(_current_company, OWNER_TOWN, FILE_LINE);
+ Backup<CompanyID> cur_company(_current_company, OWNER_TOWN, FILE_LINE);
CommandCost rc = DoCommand(t->xy, t->index, 0, DC_EXEC, CMD_DELETE_TOWN);
cur_company.Restore();
assert(rc.Succeeded());
@@ -2940,7 +2940,7 @@ static CommandCost TownActionRoadRebuild(Town *t, DoCommandFlag flags)
*/
static bool TryClearTile(TileIndex tile)
{
- Backup<CompanyByte> cur_company(_current_company, OWNER_NONE, FILE_LINE);
+ Backup<CompanyID> cur_company(_current_company, OWNER_NONE, FILE_LINE);
CommandCost r = DoCommand(tile, 0, 0, DC_NONE, CMD_LANDSCAPE_CLEAR);
cur_company.Restore();
return r.Succeeded();
@@ -3012,7 +3012,7 @@ static CommandCost TownActionBuildStatue(Town *t, DoCommandFlag flags)
if (!CircularTileSearch(&tile, 9, SearchTileForStatue, &statue_data)) return_cmd_error(STR_ERROR_STATUE_NO_SUITABLE_PLACE);
if (flags & DC_EXEC) {
- Backup<CompanyByte> cur_company(_current_company, OWNER_NONE, FILE_LINE);
+ Backup<CompanyID> cur_company(_current_company, OWNER_NONE, FILE_LINE);
DoCommand(statue_data.best_position, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);
cur_company.Restore();
BuildObject(OBJECT_STATUE, statue_data.best_position, _current_company, t);