Merge branch 'master' into jgrpp-beta
# Conflicts: # src/saveload/cargopacket_sl.cpp # src/saveload/cheat_sl.cpp # src/saveload/company_sl.cpp # src/saveload/engine_sl.cpp # src/saveload/map_sl.cpp # src/saveload/order_sl.cpp # src/saveload/saveload.cpp # src/saveload/saveload.h # src/saveload/station_sl.cpp # src/saveload/vehicle_sl.cpp # src/settings.cpp # src/settings_gui.cpp # src/settings_internal.h # src/stdafx.h # src/table/settings/settings.ini # src/town_cmd.cpp # src/vehicle.cpp
This commit is contained in:
@@ -114,13 +114,17 @@ Town::~Town()
|
||||
* and remove from list of sorted towns */
|
||||
DeleteWindowById(WC_TOWN_VIEW, this->index);
|
||||
|
||||
/* Check no industry is related to us. */
|
||||
#ifdef WITH_ASSERT
|
||||
for (const Industry *i : Industry::Iterate()) assert(i->town != this);
|
||||
/* Check no industry is related to us. */
|
||||
for (const Industry *i : Industry::Iterate()) {
|
||||
assert(i->town != this);
|
||||
}
|
||||
|
||||
/* ... and no object is related to us. */
|
||||
for (const Object *o : Object::Iterate()) assert(o->town != this);
|
||||
#endif
|
||||
for (const Object *o : Object::Iterate()) {
|
||||
assert(o->town != this);
|
||||
}
|
||||
#endif /* WITH_ASSERT */
|
||||
|
||||
/* Check no tile is related to us. */
|
||||
for (TileIndex tile = 0; tile < MapSize(); ++tile) {
|
||||
@@ -2420,8 +2424,7 @@ static Town *CreateRandomTown(uint attempts, uint32 townnameparts, TownSize size
|
||||
if (t->cache.population > 0) return t;
|
||||
|
||||
Backup<CompanyID> cur_company(_current_company, OWNER_TOWN, FILE_LINE);
|
||||
CommandCost rc = DoCommand(t->xy, t->index, 0, DC_EXEC, CMD_DELETE_TOWN);
|
||||
(void)rc; // assert only
|
||||
[[maybe_unused]] CommandCost rc = DoCommand(t->xy, t->index, 0, DC_EXEC, CMD_DELETE_TOWN);
|
||||
cur_company.Restore();
|
||||
assert(rc.Succeeded());
|
||||
|
||||
@@ -2542,8 +2545,7 @@ HouseZonesBits GetTownRadiusGroup(const Town *t, TileIndex tile)
|
||||
*/
|
||||
static inline void ClearMakeHouseTile(TileIndex tile, Town *t, byte counter, byte stage, HouseID type, byte random_bits)
|
||||
{
|
||||
CommandCost cc = DoCommand(tile, 0, 0, DC_EXEC | DC_AUTO | DC_NO_WATER | DC_TOWN, CMD_LANDSCAPE_CLEAR);
|
||||
(void)cc; // assert only
|
||||
[[maybe_unused]] CommandCost cc = DoCommand(tile, 0, 0, DC_EXEC | DC_AUTO | DC_NO_WATER | DC_TOWN, CMD_LANDSCAPE_CLEAR);
|
||||
assert(cc.Succeeded());
|
||||
|
||||
IncreaseBuildingCount(t, type);
|
||||
|
Reference in New Issue
Block a user