summaryrefslogtreecommitdiff
path: root/src/station.h
diff options
context:
space:
mode:
authortron <tron@openttd.org>2007-01-17 22:32:34 +0000
committertron <tron@openttd.org>2007-01-17 22:32:34 +0000
commitd80009c611f9eee5ac727690c5d9bde071b73d4f (patch)
tree1af5c63dbc69cb531446410531f5416861231627 /src/station.h
parent323898cb97011ffc67f668cce6cd5a6cf4ea95e8 (diff)
downloadopenttd-d80009c611f9eee5ac727690c5d9bde071b73d4f.tar.xz
(svn r8212) -Fix
Remove the unnecessary attribute RoadStop::used. The same information can be derived from RoadStop::xy
Diffstat (limited to 'src/station.h')
-rw-r--r--src/station.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/station.h b/src/station.h
index 7d0ec21fa..7299b87f7 100644
--- a/src/station.h
+++ b/src/station.h
@@ -46,9 +46,8 @@ enum {
typedef struct RoadStop {
TileIndex xy;
- bool used;
- byte status;
RoadStopID index;
+ byte status;
byte num_vehicles;
struct RoadStop *next;
struct RoadStop *prev;
@@ -258,7 +257,7 @@ DECLARE_OLD_POOL(RoadStop, RoadStop, 5, 2000)
*/
static inline bool IsValidRoadStop(const RoadStop *rs)
{
- return rs->used;
+ return rs->xy != INVALID_TILE;
}
#define FOR_ALL_ROADSTOPS_FROM(rs, start) for (rs = GetRoadStop(start); rs != NULL; rs = (rs->index + 1U < GetRoadStopPoolSize()) ? GetRoadStop(rs->index + 1U) : NULL) if (IsValidRoadStop(rs))