From 871107f52952ee59c353feab933126ed206e60bf Mon Sep 17 00:00:00 2001 From: smatz Date: Sun, 17 May 2009 01:00:56 +0000 Subject: (svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index) --- src/industry.h | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'src/industry.h') 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()); } -- cgit v1.2.3-54-g00ecf