Mercurial > hg > openttd
changeset 6260:c0de6f270ae9 draft
(svn r9069) -Codechange: Change a do ... while loop with a for loop. This fixes some warning that I never got anyway...
author | peter1138 <peter1138@openttd.org> |
---|---|
date | Thu, 08 Mar 2007 19:23:49 +0000 |
parents | 4a39d6291d58 |
children | a2ab35efe1ab |
files | src/station_gui.cpp |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -640,8 +640,7 @@ y += 10; } - CargoID i = 0; - do { + for (CargoID i = 0; i != NUM_CARGO && pos > -5; i++) { uint waiting = GB(st->goods[i].waiting_acceptance, 0, 12); if (waiting == 0) continue; @@ -677,7 +676,7 @@ y += 10; } } - } while (pos > -5 && ++i != NUM_CARGO); + } if (IsWindowOfPrototype(w, _station_view_widgets)) { char *b = _userstring;