station.h
changeset 5247 1f982de55b88
parent 5220 1530d0cdf648
child 5395 7727da322d66
equal deleted inserted replaced
5246:fb214a312549 5247:1f982de55b88
   142 void RebuildStationLists(void);
   142 void RebuildStationLists(void);
   143 void ResortStationLists(void);
   143 void ResortStationLists(void);
   144 
   144 
   145 DECLARE_OLD_POOL(Station, Station, 6, 1000)
   145 DECLARE_OLD_POOL(Station, Station, 6, 1000)
   146 
   146 
   147 static inline StationID GetStationArraySize(void)
   147 static inline StationID GetMaxStationIndex(void)
   148 {
   148 {
   149 	/* TODO - This isn't the real content of the function, but
   149 	/* TODO - This isn't the real content of the function, but
   150 	 *  with the new pool-system this will be replaced with one that
   150 	 *  with the new pool-system this will be replaced with one that
   151 	 *  _really_ returns the highest index + 1. Now it just returns
   151 	 *  _really_ returns the highest index. Now it just returns
   152 	 *  the next safe value we are sure about everything is below.
   152 	 *  the next safe value we are sure about everything is below.
   153 	 */
   153 	 */
       
   154 	return GetStationPoolSize() - 1;
       
   155 }
       
   156 
       
   157 static inline uint GetNumStations(void)
       
   158 {
   154 	return GetStationPoolSize();
   159 	return GetStationPoolSize();
   155 }
   160 }
   156 
   161 
   157 /**
   162 /**
   158  * Check if a station really exists.
   163  * Check if a station really exists.