(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user