station.h
changeset 1718 cef0773365eb
parent 1685 b9cfe79393c0
child 1742 ac65066ebfeb
--- a/station.h	Thu Apr 21 16:20:38 2005 +0000
+++ b/station.h	Fri Apr 22 05:41:09 2005 +0000
@@ -146,6 +146,11 @@
 	return _station_pool.total_items;
 }
 
+static inline bool IsStationIndex(uint index)
+{
+	return index < GetStationPoolSize();
+}
+
 #define FOR_ALL_STATIONS_FROM(st, start) for (st = GetStation(start); st != NULL; st = (st->index + 1 < GetStationPoolSize()) ? GetStation(st->index + 1) : NULL)
 #define FOR_ALL_STATIONS(st) FOR_ALL_STATIONS_FROM(st, 0)
 
@@ -292,7 +297,7 @@
 /**
  * Check if a station really exists.
  */
-static inline bool IsValidStation(Station* station)
+static inline bool IsValidStation(const Station* station)
 {
 	return station->xy != 0; /* XXX: Replace by INVALID_TILE someday */
 }