From f90172206615460d687339a1a663473025105f06 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Tue, 14 May 2024 17:29:57 +0100 Subject: [PATCH] Codechange: Rename BuildTownHouse to TryBuildTownHouse. --- src/town_cmd.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 2fae67fc47..e7a8a0e58e 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -232,7 +232,7 @@ enum TownGrowthResult { // GROWTH_SEARCH_RUNNING >= 1 }; -static bool BuildTownHouse(Town *t, TileIndex tile); +static bool TryBuildTownHouse(Town *t, TileIndex tile); static Town *CreateRandomTown(uint attempts, uint32_t townnameparts, TownSize size, bool city, TownLayout layout); static void TownDrawHouseLift(const TileInfo *ti) @@ -694,7 +694,7 @@ static void TileLoop_Town(TileIndex tile) } } - BuildTownHouse(t, tile); + TryBuildTownHouse(t, tile); } } @@ -1183,7 +1183,7 @@ static bool GrowTownWithExtraHouse(Town *t, TileIndex tile) /* If there are enough neighbors stop here */ if (counter >= 3) { - if (BuildTownHouse(t, tile)) { + if (TryBuildTownHouse(t, tile)) { _grow_town_result = GROWTH_SUCCEED; return true; } @@ -1668,7 +1668,7 @@ static void GrowTownInTile(TileIndex *tile_ptr, RoadBits cur_rb, DiagDirection t /* And build a house. * Set result to -1 if we managed to build it. */ - if (BuildTownHouse(t1, house_tile)) { + if (TryBuildTownHouse(t1, house_tile)) { _grow_town_result = GROWTH_SUCCEED; } } @@ -2672,7 +2672,7 @@ static bool CheckTownBuild2x2House(TileIndex *tile, Town *t, int maxz, bool nosl * @param tile The tile to try building on. * @return false iff no house can be built on this tile. */ -static bool BuildTownHouse(Town *t, TileIndex tile) +static bool TryBuildTownHouse(Town *t, TileIndex tile) { /* forbidden building here by town layout */ if (!TownLayoutAllowsHouseHere(t, tile)) return false;