(svn r1769) Don't compute the same value twice, remove one function call
authortron
Wed, 02 Feb 2005 15:45:53 +0000
changeset 1265 71ed55c20f6e
parent 1264 acebb2b01e32
child 1266 eccd576e322f
(svn r1769) Don't compute the same value twice, remove one function call
station_cmd.c
--- a/station_cmd.c	Wed Feb 02 14:17:13 2005 +0000
+++ b/station_cmd.c	Wed Feb 02 15:45:53 2005 +0000
@@ -1670,15 +1670,13 @@
 		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);