# HG changeset patch # User tron # Date 1169709066 0 # Node ID f9e0c80cf037fe9ce8b61d3fe5a29a7e808466b2 # Parent bcd4b73b9fd2e90ec99cf3eb9ad4d50903706733 (svn r8400) -Fix Simplify r8399 diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1359,10 +1359,6 @@ 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 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 @@ } /* ensure that in case of error (or no DC_EXEC) the new road stop gets deleted upon return */ - rs_auto_delete = std::auto_ptr(road_stop); + std::auto_ptr rs_auto_delete(road_stop); if (st != NULL && GetNumRoadStopsInStation(st, RS_BUS) + GetNumRoadStopsInStation(st, RS_TRUCK) >= ROAD_STOP_LIMIT) {