diff options
author | rubidium <rubidium@openttd.org> | 2009-05-17 11:18:34 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-05-17 11:18:34 +0000 |
commit | 88201ccd5cd1cc6a5def1ecc9e42291399cd3c37 (patch) | |
tree | 70959c2ccb22d7bee88ffc1f117dfb2877f58fbe /src | |
parent | e7dedf4e1b2569a3f595f045a61d3d4bc144f3de (diff) | |
download | openttd-88201ccd5cd1cc6a5def1ecc9e42291399cd3c37.tar.xz |
(svn r16333) -Cleanup: remove a bunch of unused wrapper functions.
Diffstat (limited to 'src')
-rw-r--r-- | src/industry.h | 10 | ||||
-rw-r--r-- | src/order_base.h | 15 | ||||
-rw-r--r-- | src/signs_base.h | 10 | ||||
-rw-r--r-- | src/station_base.h | 15 | ||||
-rw-r--r-- | src/town.h | 10 | ||||
-rw-r--r-- | src/vehicle_base.h | 15 |
6 files changed, 0 insertions, 75 deletions
diff --git a/src/industry.h b/src/industry.h index c0f632cf1..988d6e0bb 100644 --- a/src/industry.h +++ b/src/industry.h @@ -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 diff --git a/src/order_base.h b/src/order_base.h index 67edbb2c2..0490db068 100644 --- a/src/order_base.h +++ b/src/order_base.h @@ -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. */ diff --git a/src/signs_base.h b/src/signs_base.h index 0170b0a9a..dd8d13bf0 100644 --- a/src/signs_base.h +++ b/src/signs_base.h @@ -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) diff --git a/src/station_base.h b/src/station_base.h index 876d0d345..2fa332a70 100644 --- a/src/station_base.h +++ b/src/station_base.h @@ -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) diff --git a/src/town.h b/src/town.h index 059040f2f..d653fa59e 100644 --- a/src/town.h +++ b/src/town.h @@ -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; diff --git a/src/vehicle_base.h b/src/vehicle_base.h index 47e87d0a4..423da71af 100644 --- a/src/vehicle_base.h +++ b/src/vehicle_base.h @@ -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) |