mirror of https://github.com/OpenTTD/OpenTTD
(svn r16333) -Cleanup: remove a bunch of unused wrapper functions.
parent
e7dedf4e1b
commit
88201ccd5c
|
@ -265,16 +265,6 @@ void BuildIndustriesLegend();
|
||||||
/* industry_cmd.cpp */
|
/* industry_cmd.cpp */
|
||||||
void SetIndustryDailyChanges();
|
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 int _total_industries; // general counter
|
||||||
extern uint16 _industry_counts[NUM_INDUSTRYTYPES]; // Number of industries per type ingame
|
extern uint16 _industry_counts[NUM_INDUSTRYTYPES]; // Number of industries per type ingame
|
||||||
|
|
||||||
|
|
|
@ -243,21 +243,6 @@ public:
|
||||||
void ConvertFromOldSavegame();
|
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
|
/** Shared order list linking together the linked list of orders and the list
|
||||||
* of vehicles sharing this order list.
|
* of vehicles sharing this order list.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -31,16 +31,6 @@ struct Sign : PoolItem<Sign, SignID, &_Sign_pool> {
|
||||||
inline bool IsValid() const { return this->owner != INVALID_OWNER; }
|
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_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)
|
#define FOR_ALL_SIGNS(ss) FOR_ALL_SIGNS_FROM(ss, 0)
|
||||||
|
|
||||||
|
|
|
@ -204,21 +204,6 @@ public:
|
||||||
uint GetCatchmentRadius() const;
|
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_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)
|
#define FOR_ALL_STATIONS(st) FOR_ALL_STATIONS_FROM(st, 0)
|
||||||
|
|
||||||
|
|
10
src/town.h
10
src/town.h
|
@ -295,16 +295,6 @@ static inline HouseSpec *GetHouseSpecs(HouseID house_id)
|
||||||
|
|
||||||
TileIndexDiff GetHouseNorthPart(HouseID &house);
|
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()
|
static inline uint GetNumTowns()
|
||||||
{
|
{
|
||||||
extern uint _total_towns;
|
extern uint _total_towns;
|
||||||
|
|
|
@ -642,21 +642,6 @@ struct InvalidVehicle : public Vehicle {
|
||||||
void Tick() {}
|
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_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)
|
#define FOR_ALL_VEHICLES(v) FOR_ALL_VEHICLES_FROM(v, 0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue