Mercurial > hg > openttd
changeset 11930:b17404281f58 draft
(svn r16333) -Cleanup: remove a bunch of unused wrapper functions.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Sun, 17 May 2009 11:18:34 +0000 |
parents | 12bd4fc18d95 |
children | 78f0df0292ff |
files | src/industry.h src/order_base.h src/signs_base.h src/station_base.h src/town.h src/vehicle_base.h |
diffstat | 6 files changed, 0 insertions(+), 75 deletions(-) [+] |
line wrap: on
line diff
--- a/src/industry.h +++ b/src/industry.h @@ -265,16 +265,6 @@ /* 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
--- a/src/order_base.h +++ b/src/order_base.h @@ -243,21 +243,6 @@ 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. */
--- a/src/signs_base.h +++ b/src/signs_base.h @@ -31,16 +31,6 @@ 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)
--- a/src/station_base.h +++ b/src/station_base.h @@ -204,21 +204,6 @@ 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)
--- a/src/town.h +++ b/src/town.h @@ -295,16 +295,6 @@ 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;
--- a/src/vehicle_base.h +++ b/src/vehicle_base.h @@ -642,21 +642,6 @@ 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)