diff options
author | smatz <smatz@openttd.org> | 2009-05-22 15:23:47 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-05-22 15:23:47 +0000 |
commit | 10d1ef5447b94d17024dc0f4bdd1b7b017431a23 (patch) | |
tree | a9563d19933124547ccd3d6c0e53c44876bdc144 /src/town.h | |
parent | 62a7948af0ca9eb3b190a54918201e1075edcbbc (diff) | |
download | openttd-10d1ef5447b94d17024dc0f4bdd1b7b017431a23.tar.xz |
(svn r16379) -Codechange: remove GetNumTowns(), GetNumIndustries() and GetActiveCompanyCount(), use PoolItem::GetNumItems() instead
Diffstat (limited to 'src/town.h')
-rw-r--r-- | src/town.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/town.h b/src/town.h index 076037881..ca8ef7f29 100644 --- a/src/town.h +++ b/src/town.h @@ -294,17 +294,12 @@ static inline HouseSpec *GetHouseSpecs(HouseID house_id) TileIndexDiff GetHouseNorthPart(HouseID &house); -static inline uint GetNumTowns() -{ - return (uint)Town::GetNumItems(); -} - /** * Return a random valid town. */ static inline Town *GetRandomTown() { - int num = RandomRange(GetNumTowns()); + int num = RandomRange((uint16)Town::GetNumItems()); TownID index = INVALID_TOWN; while (num >= 0) { |