diff options
author | tron <tron@openttd.org> | 2005-11-15 11:46:49 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-11-15 11:46:49 +0000 |
commit | 3bf8d2ccbbf75533c3578bfebde1238b7293b3ad (patch) | |
tree | 0bba4bcbec8dbc4fc490bfa7376a2ee15cd3556c /settings_gui.c | |
parent | 66d44766a7cb4f8ba61ece7ab9e932d7ba99c1d3 (diff) | |
download | openttd-3bf8d2ccbbf75533c3578bfebde1238b7293b3ad.tar.xz |
(svn r3190) Turn some loops into canonical for loop form
Diffstat (limited to 'settings_gui.c')
-rw-r--r-- | settings_gui.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/settings_gui.c b/settings_gui.c index 3f6b520d2..433a7799d 100644 --- a/settings_gui.c +++ b/settings_gui.c @@ -1277,13 +1277,10 @@ void ShowNewgrf(void) { // little helper function to calculate _grffile_count // should be REMOVED once _grffile_count is calculated at loading - const GRFFile* c = _first_grffile; + const GRFFile* c; _grffile_count = 0; - while (c != NULL) { - _grffile_count++; - c = c->next; - } + for (c = _first_grffile; c != NULL; c = c->next) _grffile_count++; } w->vscroll.cap = 12; |