(svn r4881) -Codechange: Be a little more strict about types and remove some null-operations
This commit is contained in:
		| @@ -183,9 +183,10 @@ int32 CmdBuildBridge(TileIndex end_tile, uint32 flags, uint32 p1, uint32 p2) | |||||||
| 	int bridge_type; | 	int bridge_type; | ||||||
| 	TransportType transport; | 	TransportType transport; | ||||||
| 	RailType railtype; | 	RailType railtype; | ||||||
| 	int x; | 	uint x; | ||||||
| 	int y; | 	uint y; | ||||||
| 	int sx,sy; | 	uint sx; | ||||||
|  | 	uint sy; | ||||||
| 	TileIndex tile_start; | 	TileIndex tile_start; | ||||||
| 	TileIndex tile_end; | 	TileIndex tile_end; | ||||||
| 	Slope tileh_start; | 	Slope tileh_start; | ||||||
| @@ -227,16 +228,10 @@ int32 CmdBuildBridge(TileIndex end_tile, uint32 flags, uint32 p1, uint32 p2) | |||||||
| 	if (x == sx) { | 	if (x == sx) { | ||||||
| 		if (y == sy) return_cmd_error(STR_5008_CANNOT_START_AND_END_ON); | 		if (y == sy) return_cmd_error(STR_5008_CANNOT_START_AND_END_ON); | ||||||
| 		direction = AXIS_Y; | 		direction = AXIS_Y; | ||||||
| 		if (y > sy) { | 		if (y > sy) intswap(y,sy); | ||||||
| 			intswap(y,sy); |  | ||||||
| 			intswap(x,sx); |  | ||||||
| 		} |  | ||||||
| 	} else if (y == sy) { | 	} else if (y == sy) { | ||||||
| 		direction = AXIS_X; | 		direction = AXIS_X; | ||||||
| 		if (x > sx) { | 		if (x > sx) intswap(x,sx); | ||||||
| 			intswap(y,sy); |  | ||||||
| 			intswap(x,sx); |  | ||||||
| 		} |  | ||||||
| 	} else { | 	} else { | ||||||
| 		return_cmd_error(STR_500A_START_AND_END_MUST_BE_IN); | 		return_cmd_error(STR_500A_START_AND_END_MUST_BE_IN); | ||||||
| 	} | 	} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 celestar
					celestar