summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
authortron <tron@openttd.org>2007-01-25 07:11:06 +0000
committertron <tron@openttd.org>2007-01-25 07:11:06 +0000
commit1da6c719fdde95178963b45cc0cc23a9a601fb34 (patch)
tree95e230459aef9506775a8522a7e687b9b83efc1f /src/station_cmd.cpp
parent1b48fd232f48ed0be176e6f630821e7b1fea2490 (diff)
downloadopenttd-1da6c719fdde95178963b45cc0cc23a9a601fb34.tar.xz
(svn r8400) -Fix
Simplify r8399
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index e5924cbd8..8cef0f4bc 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -1359,10 +1359,6 @@ int32 CmdBuildRoadStop(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (st != NULL && st->facilities != 0) st = NULL;
}
- /* If DC_EXEC is NOT set we still need to create the road stop to test if everything is OK.
- * In this case we need to delete it before return. */
- std::auto_ptr<RoadStop> rs_auto_delete;
-
//give us a road stop in the list, and check if something went wrong
road_stop = new RoadStop(tile);
if (road_stop == NULL) {
@@ -1370,7 +1366,7 @@ int32 CmdBuildRoadStop(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
}
/* ensure that in case of error (or no DC_EXEC) the new road stop gets deleted upon return */
- rs_auto_delete = std::auto_ptr<RoadStop>(road_stop);
+ std::auto_ptr<RoadStop> rs_auto_delete(road_stop);
if (st != NULL &&
GetNumRoadStopsInStation(st, RS_BUS) + GetNumRoadStopsInStation(st, RS_TRUCK) >= ROAD_STOP_LIMIT) {