(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)

This commit is contained in:
smatz
2009-05-16 23:34:14 +00:00
parent 814f153b5a
commit 6221d74644
116 changed files with 645 additions and 637 deletions

View File

@@ -272,7 +272,7 @@ void SetIndustryDailyChanges();
*/
static inline bool IsValidIndustryID(IndustryID index)
{
return index < GetIndustryPoolSize() && GetIndustry(index)->IsValid();
return index < GetIndustryPoolSize() && Industry::Get(index)->IsValid();
}
@@ -352,10 +352,10 @@ static inline Industry *GetRandomIndustry()
}
}
return GetIndustry(index);
return Industry::Get(index);
}
#define FOR_ALL_INDUSTRIES_FROM(i, start) for (i = GetIndustry(start); i != NULL; i = (i->index + 1U < GetIndustryPoolSize()) ? GetIndustry(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 < GetIndustryPoolSize()) ? 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;