# HG changeset patch # User tron # Date 2005-02-02 15:45:53 # Node ID eeb75e2e160c5c625cd17c112f73cfb4195a012f # Parent 32e75a054596f8b3faf7e19bb9f59c47f087bb62 (svn r1769) Don't compute the same value twice, remove one function call diff --git a/station_cmd.c b/station_cmd.c --- a/station_cmd.c +++ b/station_cmd.c @@ -1670,15 +1670,13 @@ int32 CmdBuildAirport(int x, int y, uint if (st->airport_tile != 0) return_cmd_error(STR_300D_TOO_CLOSE_TO_ANOTHER_AIRPORT); } else { - Town *t; - airport_upgrade = false; st = AllocateStation(); if (st == NULL) return CMD_ERROR; - st->town = t = ClosestTownFromTile(tile, (uint)-1); + st->town = t; if (_current_player < MAX_PLAYERS && flags&DC_EXEC) SETBIT(t->have_ratings, _current_player);