summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2007-02-18 09:00:34 +0000
committertron <tron@openttd.org>2007-02-18 09:00:34 +0000
commit1a1129785ae72f26a52fa22402942273f896880e (patch)
tree1fb7b6576fa652a7971a65377442bd6c681de233
parent46c872b3666ff8a030c9c8c02e992d1e35899d10 (diff)
downloadopenttd-1a1129785ae72f26a52fa22402942273f896880e.tar.xz
(svn r8796) -Fix
Remove the unused function AllocateStation() which was left over from r8125
-rw-r--r--src/station_cmd.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index a13edd7a5..fae6a60c8 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -141,29 +141,6 @@ static Station* GetStationAround(TileIndex tile, int w, int h, StationID closest
return (closest_station == INVALID_STATION) ? NULL : GetStation(closest_station);
}
-static Station *AllocateStation(void)
-{
- Station *st = NULL;
-
- /* 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 (!st->IsValid()) {
- StationID index = st->index;
-
- memset(st, 0, sizeof(Station));
- st->index = index;
- return st;
- }
- }
-
- /* Check if we can add a block to the pool */
- if (AddBlockToPool(&_Station_pool)) return AllocateStation();
-
- _error_message = STR_3008_TOO_MANY_STATIONS_LOADING;
- return NULL;
-}
-
/**
* Counts the numbers of tiles matching a specific type in the area around