(svn r1769) Don't compute the same value twice, remove one function call
authortron
Wed, 02 Feb 2005 15:45:53 +0000
changeset 1265 0430e635b116
parent 1264 280792016b02
child 1266 9dc5638fe8cc
(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);