Changeset - r847:ac7c89036a9f
[Not reviewed]
master
0 1 0
tron - 20 years ago 2005-01-03 08:33:04
tron@openttd.org
(svn r1328) Turn loop with explicit terminator element into loop using endof()
1 file changed with 3 insertions and 5 deletions:
0 comments (0 inline, 0 general)
station_cmd.c
Show inline comments
 
@@ -170,14 +170,12 @@ static int CountMapSquareAround(uint til
 
		TILE_XY(-6,1),  1, 1, 1, 1, 1, 1,
 
		TILE_XY(-6,1),  1, 1, 1, 1, 1, 1,
 
		TILE_XY(-6,1),  1, 1, 1, 1, 1, 1,
 
		0,
 
	};
 
	int j;
 
	const TileIndexDiff *p = _count_square_table;
 
	const TileIndexDiff *p;
 
	int num = 0;
 

	
 
	while ( (j=*p++) != 0 ) {
 
		tile = TILE_MASK(tile + j);
 
	for (p = _count_square_table; p != endof(_count_square_table); ++p) {
 
		tile = TILE_MASK(tile + *p);
 

	
 
		if (IS_TILETYPE(tile, type) && _map5[tile] >= min && _map5[tile] <= max)
 
			num++;
0 comments (0 inline, 0 general)