diff options
author | smatz <smatz@openttd.org> | 2009-05-16 23:44:36 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-05-16 23:44:36 +0000 |
commit | ed1e54bd84074412ea9f273b7cd86aed42d844ce (patch) | |
tree | 4a5ab5dbd304f9a53f8f0065bc6965b1680ded78 /src/industry.h | |
parent | 6221d74644922ea4bbba3ed9cd8bbec42398f77b (diff) | |
download | openttd-ed1e54bd84074412ea9f273b7cd86aed42d844ce.tar.xz |
(svn r16326) -Codechange: replace GetPoolItemPoolSize() by PoolItem::GetPoolSize()
Diffstat (limited to 'src/industry.h')
-rw-r--r-- | src/industry.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/industry.h b/src/industry.h index d06764429..69af3f436 100644 --- a/src/industry.h +++ b/src/industry.h @@ -272,7 +272,7 @@ void SetIndustryDailyChanges(); */ static inline bool IsValidIndustryID(IndustryID index) { - return index < GetIndustryPoolSize() && Industry::Get(index)->IsValid(); + return index < Industry::GetPoolSize() && Industry::Get(index)->IsValid(); } @@ -283,7 +283,7 @@ static inline IndustryID GetMaxIndustryIndex() * _really_ returns the highest index. Now it just returns * the next safe value we are sure about everything is below. */ - return GetIndustryPoolSize() - 1; + return Industry::GetPoolSize() - 1; } extern int _total_industries; // general counter @@ -355,7 +355,7 @@ static inline Industry *GetRandomIndustry() return Industry::Get(index); } -#define FOR_ALL_INDUSTRIES_FROM(i, start) for (i = Industry::Get(start); i != NULL; i = (i->index + 1U < GetIndustryPoolSize()) ? Industry::Get(i->index + 1U) : NULL) if (i->IsValid()) +#define FOR_ALL_INDUSTRIES_FROM(i, start) for (i = Industry::Get(start); i != NULL; i = (i->index + 1U < Industry::GetPoolSize()) ? Industry::Get(i->index + 1U) : NULL) if (i->IsValid()) #define FOR_ALL_INDUSTRIES(i) FOR_ALL_INDUSTRIES_FROM(i, 0) static const uint8 IT_INVALID = 255; |