diff options
author | smatz <smatz@openttd.org> | 2009-05-17 01:00:56 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-05-17 01:00:56 +0000 |
commit | 871107f52952ee59c353feab933126ed206e60bf (patch) | |
tree | 482884dfedc1700bddb8812f1de755212ed8bb22 /src/industry.h | |
parent | ed1e54bd84074412ea9f273b7cd86aed42d844ce (diff) | |
download | openttd-871107f52952ee59c353feab933126ed206e60bf.tar.xz |
(svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index)
Diffstat (limited to 'src/industry.h')
-rw-r--r-- | src/industry.h | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/industry.h b/src/industry.h index 69af3f436..a36fb5ca0 100644 --- a/src/industry.h +++ b/src/industry.h @@ -265,17 +265,6 @@ void BuildIndustriesLegend(); /* industry_cmd.cpp */ void SetIndustryDailyChanges(); -/** - * Check if an Industry exists whithin the pool of industries - * @param index of the desired industry - * @return true if it is inside the pool - */ -static inline bool IsValidIndustryID(IndustryID index) -{ - return index < Industry::GetPoolSize() && Industry::Get(index)->IsValid(); -} - - static inline IndustryID GetMaxIndustryIndex() { /* TODO - This isn't the real content of the function, but @@ -346,7 +335,7 @@ static inline Industry *GetRandomIndustry() index++; /* Make sure we have a valid industry */ - while (!IsValidIndustryID(index)) { + while (!Industry::IsValidID(index)) { index++; assert(index <= GetMaxIndustryIndex()); } |