summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2005-11-12 08:51:46 +0000
committerpeter1138 <peter1138@openttd.org>2005-11-12 08:51:46 +0000
commitb3056bc799f51c631eed2521032071a79a4229c3 (patch)
tree2791c360870a1bc3dc28549679be38e0edd891a7
parenta7fe1495cd617aa18b2e0cba929a54c2c4e4c2a6 (diff)
downloadopenttd-b3056bc799f51c631eed2521032071a79a4229c3.tar.xz
(svn r3169) Little bit of coding style fixing, and change from value to lengthof()
-rw-r--r--newgrf.c7
-rw-r--r--rail_gui.c5
2 files changed, 6 insertions, 6 deletions
diff --git a/newgrf.c b/newgrf.c
index 0d0ed95cd..4d44dd6b3 100644
--- a/newgrf.c
+++ b/newgrf.c
@@ -2392,13 +2392,12 @@ static void ReleaseSpriteGroups(GRFFile *file)
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 --git a/rail_gui.c b/rail_gui.c
index 668e797ff..e105c6679 100644
--- a/rail_gui.c
+++ b/rail_gui.c
@@ -833,9 +833,10 @@ static void BuildWaypointWndProc(Window *w, WindowEvent *e)
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;
}