# HG changeset patch # User peter1138 # Date 1131785506 0 # Node ID 7a29af37b41617ab0ece1d413fc5fbb327145464 # Parent c3e8dc0f9152bf731fc5812145212ce4e8f7610d (svn r3169) Little bit of coding style fixing, and change from value to lengthof() diff -r c3e8dc0f9152 -r 7a29af37b416 newgrf.c --- a/newgrf.c Sat Nov 12 00:29:13 2005 +0000 +++ b/newgrf.c Sat Nov 12 08:51:46 2005 +0000 @@ -2392,13 +2392,12 @@ static void ResetCustomStations(void) { GRFFile *file; - int i; + uint i; CargoID c; for (file = _first_grffile; file != NULL; file = file->next) { - for (i = 0; i < 256; i++) { - if (file->stations[i].grfid != file->grfid) - continue; + for (i = 0; i < lengthof(file->stations); i++) { + if (file->stations[i].grfid != file->grfid) continue; // TODO: Release renderdata, platforms and layouts diff -r c3e8dc0f9152 -r 7a29af37b416 rail_gui.c --- a/rail_gui.c Sat Nov 12 00:29:13 2005 +0000 +++ b/rail_gui.c Sat Nov 12 08:51:46 2005 +0000 @@ -833,9 +833,10 @@ w->click_state = (1 << 3) << (_cur_waypoint_type - w->hscroll.pos); DrawWindowWidgets(w); - for (i = 0; i < 5; i++) - if(w->hscroll.pos + i < _waypoint_count) + for (i = 0; i < 5; i++) { + if (w->hscroll.pos + i < _waypoint_count) DrawWaypointSprite(2 + i * 68, 25, w->hscroll.pos + i, _cur_railtype); + } break; }