1
0
Fork 0

(svn r16333) -Cleanup: remove a bunch of unused wrapper functions.

release/1.0
rubidium 2009-05-17 11:18:34 +00:00
parent e7dedf4e1b
commit 88201ccd5c
6 changed files with 0 additions and 75 deletions

View File

@ -265,16 +265,6 @@ void BuildIndustriesLegend();
/* industry_cmd.cpp */
void SetIndustryDailyChanges();
static inline IndustryID GetMaxIndustryIndex()
{
/* TODO - This isn't the real content of the function, but
* with the new pool-system this will be replaced with one that
* _really_ returns the highest index. Now it just returns
* the next safe value we are sure about everything is below.
*/
return Industry::GetPoolSize() - 1;
}
extern int _total_industries; // general counter
extern uint16 _industry_counts[NUM_INDUSTRYTYPES]; // Number of industries per type ingame

View File

@ -243,21 +243,6 @@ public:
void ConvertFromOldSavegame();
};
static inline VehicleOrderID GetMaxOrderIndex()
{
/* TODO - This isn't the real content of the function, but
* with the new pool-system this will be replaced with one that
* _really_ returns the highest index. Now it just returns
* the next safe value we are sure about everything is below.
*/
return Order::GetPoolSize() - 1;
}
static inline VehicleOrderID GetNumOrders()
{
return Order::GetPoolSize();
}
/** Shared order list linking together the linked list of orders and the list
* of vehicles sharing this order list.
*/

View File

@ -31,16 +31,6 @@ struct Sign : PoolItem<Sign, SignID, &_Sign_pool> {
inline bool IsValid() const { return this->owner != INVALID_OWNER; }
};
static inline SignID GetMaxSignIndex()
{
/* TODO - This isn't the real content of the function, but
* with the new pool-system this will be replaced with one that
* _really_ returns the highest index. Now it just returns
* the next safe value we are sure about everything is below.
*/
return Sign::GetPoolSize() - 1;
}
#define FOR_ALL_SIGNS_FROM(ss, start) for (ss = Sign::Get(start); ss != NULL; ss = (ss->index + 1U < Sign::GetPoolSize()) ? Sign::Get(ss->index + 1U) : NULL) if (ss->IsValid())
#define FOR_ALL_SIGNS(ss) FOR_ALL_SIGNS_FROM(ss, 0)

View File

@ -204,21 +204,6 @@ public:
uint GetCatchmentRadius() const;
};
static inline StationID GetMaxStationIndex()
{
/* TODO - This isn't the real content of the function, but
* with the new pool-system this will be replaced with one that
* _really_ returns the highest index. Now it just returns
* the next safe value we are sure about everything is below.
*/
return Station::GetPoolSize() - 1;
}
static inline uint GetNumStations()
{
return Station::GetPoolSize();
}
#define FOR_ALL_STATIONS_FROM(st, start) for (st = Station::Get(start); st != NULL; st = (st->index + 1U < Station::GetPoolSize()) ? Station::Get(st->index + 1U) : NULL) if (st->IsValid())
#define FOR_ALL_STATIONS(st) FOR_ALL_STATIONS_FROM(st, 0)

View File

@ -295,16 +295,6 @@ static inline HouseSpec *GetHouseSpecs(HouseID house_id)
TileIndexDiff GetHouseNorthPart(HouseID &house);
static inline TownID GetMaxTownIndex()
{
/* TODO - This isn't the real content of the function, but
* with the new pool-system this will be replaced with one that
* _really_ returns the highest index. Now it just returns
* the next safe value we are sure about everything is below.
*/
return Town::GetPoolSize() - 1;
}
static inline uint GetNumTowns()
{
extern uint _total_towns;

View File

@ -642,21 +642,6 @@ struct InvalidVehicle : public Vehicle {
void Tick() {}
};
static inline VehicleID GetMaxVehicleIndex()
{
/* TODO - This isn't the real content of the function, but
* with the new pool-system this will be replaced with one that
* _really_ returns the highest index. Now it just returns
* the next safe value we are sure about everything is below.
*/
return Vehicle::GetPoolSize() - 1;
}
static inline uint GetNumVehicles()
{
return Vehicle::GetPoolSize();
}
#define FOR_ALL_VEHICLES_FROM(v, start) for (v = Vehicle::Get(start); v != NULL; v = (v->index + 1U < Vehicle::GetPoolSize()) ? Vehicle::Get(v->index + 1) : NULL) if (v->IsValid())
#define FOR_ALL_VEHICLES(v) FOR_ALL_VEHICLES_FROM(v, 0)