diff options
author | rubidium <rubidium@openttd.org> | 2009-12-04 21:13:31 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-12-04 21:13:31 +0000 |
commit | bc876098f739b36c39543f4b8dcaa6ae81f3e337 (patch) | |
tree | 83a2c3623456f1abaade56b0d1aa0622987956dd /src/station_cmd.cpp | |
parent | cbc6653a470afe2da443cf58e9967b2122be1628 (diff) | |
download | openttd-bc876098f739b36c39543f4b8dcaa6ae81f3e337.tar.xz |
(svn r18406) -Cleanup: remove some unneeded constants and code
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 1cc549ce5..f93a72461 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -71,18 +71,6 @@ bool IsHangar(TileIndex t) return false; } -static uint GetNumRoadStopsInStation(const Station *st, RoadStopType type) -{ - uint num = 0; - - assert(st != NULL); - for (const RoadStop *rs = st->GetPrimaryRoadStop(type); rs != NULL; rs = rs->next) { - num++; - } - - return num; -} - /** * Look for a station around the given tile area. * @param ta the area to search over @@ -1589,11 +1577,6 @@ CommandCost CmdBuildRoadStop(TileIndex tile, DoCommandFlag flags, uint32 p1, uin /* give us a road stop in the list, and check if something went wrong */ if (!RoadStop::CanAllocateItem()) return_cmd_error(type ? STR_ERROR_TOO_MANY_TRUCK_STOPS : STR_ERROR_TOO_MANY_BUS_STOPS); - if (st != NULL && - GetNumRoadStopsInStation(st, ROADSTOP_BUS) + GetNumRoadStopsInStation(st, ROADSTOP_TRUCK) >= RoadStop::LIMIT) { - return_cmd_error(type ? STR_ERROR_TOO_MANY_TRUCK_STOPS : STR_ERROR_TOO_MANY_BUS_STOPS); - } - if (st != NULL) { if (st->owner != _current_company) { return_cmd_error(STR_ERROR_TOO_CLOSE_TO_ANOTHER_STATION); |