(svn r3169) Little bit of coding style fixing, and change from value to lengthof()
This commit is contained in:
		
							
								
								
									
										7
									
								
								newgrf.c
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								newgrf.c
									
									
									
									
									
								
							| @@ -2392,13 +2392,12 @@ static void ReleaseSpriteGroups(GRFFile *file) | |||||||
| static void ResetCustomStations(void) | static void ResetCustomStations(void) | ||||||
| { | { | ||||||
| 	GRFFile *file; | 	GRFFile *file; | ||||||
| 	int i; | 	uint i; | ||||||
| 	CargoID c; | 	CargoID c; | ||||||
|  |  | ||||||
| 	for (file = _first_grffile; file != NULL; file = file->next) { | 	for (file = _first_grffile; file != NULL; file = file->next) { | ||||||
| 		for (i = 0; i < 256; i++) { | 		for (i = 0; i < lengthof(file->stations); i++) { | ||||||
| 			if (file->stations[i].grfid != file->grfid) | 			if (file->stations[i].grfid != file->grfid) continue; | ||||||
| 				continue; |  | ||||||
|  |  | ||||||
| 			// TODO: Release renderdata, platforms and layouts | 			// TODO: Release renderdata, platforms and layouts | ||||||
|  |  | ||||||
|   | |||||||
| @@ -833,9 +833,10 @@ static void BuildWaypointWndProc(Window *w, WindowEvent *e) | |||||||
| 		w->click_state = (1 << 3) << (_cur_waypoint_type - w->hscroll.pos); | 		w->click_state = (1 << 3) << (_cur_waypoint_type - w->hscroll.pos); | ||||||
| 		DrawWindowWidgets(w); | 		DrawWindowWidgets(w); | ||||||
|  |  | ||||||
| 		for (i = 0; i < 5; i++) | 		for (i = 0; i < 5; i++) { | ||||||
| 			if(w->hscroll.pos + i < _waypoint_count) | 			if (w->hscroll.pos + i < _waypoint_count) | ||||||
| 				DrawWaypointSprite(2 + i * 68, 25, w->hscroll.pos + i, _cur_railtype); | 				DrawWaypointSprite(2 + i * 68, 25, w->hscroll.pos + i, _cur_railtype); | ||||||
|  | 		} | ||||||
|  |  | ||||||
| 		break; | 		break; | ||||||
| 	} | 	} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 peter1138
					peter1138