@@ -1777,25 +1777,25 @@ int32 CmdBuildBuoy(TileIndex tile, uint3
{
Station *st;
SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION);
if (!IsClearWaterTile(tile) || tile == 0) return_cmd_error(STR_304B_SITE_UNSUITABLE);
/* allocate and initialize new station */
st = new Station(tile);
if (st == NULL) return CMD_ERROR;
/* ensure that in case of error (or no DC_EXEC) the station gets deleted upon return */
std::auto_ptr<Station> st_auto_delete = std::auto_ptr<Station>(st);
std::auto_ptr<Station> st_auto_delete(st);
st->town = ClosestTownFromTile(tile, (uint)-1);
st->sign.width_1 = 0;
if (!GenerateStationName(st, tile, 4)) return CMD_ERROR;
if (flags & DC_EXEC) {
st->dock_tile = tile;
st->facilities |= FACIL_DOCK;
/* Buoys are marked in the Station struct by this flag. Yes, it is this
* braindead.. */
st->had_vehicle_of_type |= HVOT_BUOY;