summaryrefslogtreecommitdiff
path: root/src/station_base.h
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-12-26 18:01:15 +0000
committersmatz <smatz@openttd.org>2008-12-26 18:01:15 +0000
commit419f6e099f3b32a8b1f988dd7c912754589bf6d5 (patch)
treec063679e6b2160162b5c0ab232ae441833698e1d /src/station_base.h
parent2e2086f3f884487b4f456bd4b4c1e21f96987b59 (diff)
downloadopenttd-419f6e099f3b32a8b1f988dd7c912754589bf6d5.tar.xz
(svn r14743) -Codechange: use INVALID_TILE to indicate station doesn't have queried facility (or station/roadstop is invalid) instead of 0 (Yexo)
Diffstat (limited to 'src/station_base.h')
-rw-r--r--src/station_base.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/station_base.h b/src/station_base.h
index 2943c10f8..2859096da 100644
--- a/src/station_base.h
+++ b/src/station_base.h
@@ -58,14 +58,14 @@ struct RoadStop : PoolItem<RoadStop, RoadStopID, &_RoadStop_pool> {
byte num_vehicles; ///< Number of vehicles currently slotted to this stop
struct RoadStop *next; ///< Next stop of the given type at this station
- RoadStop(TileIndex tile = 0);
+ RoadStop(TileIndex tile = INVALID_TILE);
virtual ~RoadStop();
/**
* Determines whether a road stop exists
* @return true if and only is the road stop exists
*/
- inline bool IsValid() const { return this->xy != 0; }
+ inline bool IsValid() const { return this->xy != INVALID_TILE; }
/* For accessing status */
bool HasFreeBay() const;
@@ -120,7 +120,7 @@ public:
const AirportFTAClass *Airport() const
{
- if (airport_tile == 0) return GetAirport(AT_DUMMY);
+ if (airport_tile == INVALID_TILE) return GetAirport(AT_DUMMY);
return GetAirport(airport_type);
}
@@ -171,7 +171,7 @@ public:
static const int cDebugCtorLevel = 5;
- Station(TileIndex tile = 0);
+ Station(TileIndex tile = INVALID_TILE);
virtual ~Station();
void AddFacility(byte new_facility_bit, TileIndex facil_xy);
@@ -198,7 +198,7 @@ public:
* Determines whether a station exists
* @return true if and only is the station exists
*/
- inline bool IsValid() const { return this->xy != 0; }
+ inline bool IsValid() const { return this->xy != INVALID_TILE; }
uint GetCatchmentRadius() const;
};