summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2007-02-13 15:42:52 +0000
committercelestar <celestar@openttd.org>2007-02-13 15:42:52 +0000
commit8eab3964b4ad7ebe0151aa292d42d74400214f4a (patch)
tree97f07e8c9bbb7b74d420386b638d4c6d8944d7a7 /src/station_cmd.cpp
parent6f68ac46b8c603b23123b5d899afa6988836f497 (diff)
downloadopenttd-8eab3964b4ad7ebe0151aa292d42d74400214f4a.tar.xz
(svn r8707) -Codechange: Turn IsValidStation into a method of Station
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index ac597e27b..be67f3712 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -54,7 +54,7 @@ static void StationPoolCleanBlock(uint start_item, uint end_item)
for (i = start_item; i <= end_item; i++) {
Station *st = GetStation(i);
- if (IsValidStation(st)) st->~Station();
+ if (st->IsValid()) st->~Station();
}
}
@@ -167,7 +167,7 @@ static Station *AllocateStation(void)
/* We don't use FOR_ALL here, because FOR_ALL skips invalid items.
* TODO - This is just a temporary stage, this will be removed. */
for (st = GetStation(0); st != NULL; st = (st->index + 1U < GetStationPoolSize()) ? GetStation(st->index + 1U) : NULL) {
- if (!IsValidStation(st)) {
+ if (!st->IsValid()) {
StationID index = st->index;
memset(st, 0, sizeof(Station));