summaryrefslogtreecommitdiff
path: root/src/newgrf_gui.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-03-15 13:21:31 +0000
committersmatz <smatz@openttd.org>2008-03-15 13:21:31 +0000
commitbfae49aeb2affaf239f7e9b04b6b7e226830e962 (patch)
tree430a2db18c790d538b3473d93a0c95f2afbdde7d /src/newgrf_gui.cpp
parent5db7288ea961e1418d0983d8ef4c08c32d2fc879 (diff)
downloadopenttd-bfae49aeb2affaf239f7e9b04b6b7e226830e962.tar.xz
(svn r12368) -Codechange: use explicit body for loops and conditions and remove -Wno-empty-body from the configure script
Diffstat (limited to 'src/newgrf_gui.cpp')
-rw-r--r--src/newgrf_gui.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp
index 831490c05..f153caced 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -179,7 +179,7 @@ static void NewGRFAddDlgWndProc(Window *w, WindowEvent *e)
const GRFConfig *c;
uint i = (e->we.click.pt.y - w->widget[ANGRFW_GRF_LIST].top) / 10 + w->vscroll.pos;
- for (c = _all_grfs; c != NULL && i > 0; c = c->next, i--);
+ for (c = _all_grfs; c != NULL && i > 0; c = c->next, i--) {}
WP(w, newgrf_add_d).sel = c;
SetWindowDirty(w);
break;
@@ -304,7 +304,7 @@ static void SetupNewGRFWindow(Window *w)
const GRFConfig *c;
int i;
- for (c = *WP(w, newgrf_d).list, i = 0; c != NULL; c = c->next, i++);
+ for (c = *WP(w, newgrf_d).list, i = 0; c != NULL; c = c->next, i++) {}
w->vscroll.cap = (w->widget[SNGRFS_FILE_LIST].bottom - w->widget[SNGRFS_FILE_LIST].top) / 14 + 1;
SetVScrollCount(w, i);
@@ -327,9 +327,9 @@ static void NewGRFConfirmationCallback(Window *w, bool confirmed)
ReloadNewGRFData();
/* Show new, updated list */
- for (c = *nd->list; c != NULL && c != nd->sel; c = c->next, i++);
+ for (c = *nd->list; c != NULL && c != nd->sel; c = c->next, i++) {}
CopyGRFConfigList(nd->list, *nd->orig_list, false);
- for (c = *nd->list; c != NULL && i > 0; c = c->next, i--);
+ for (c = *nd->list; c != NULL && i > 0; c = c->next, i--) {}
nd->sel = c;
SetWindowDirty(w);
@@ -474,7 +474,7 @@ static void NewGRFWndProc(Window *w, WindowEvent *e)
GRFConfig *c;
uint i = (e->we.click.pt.y - w->widget[SNGRFS_FILE_LIST].top) / 14 + w->vscroll.pos;
- for (c = *WP(w, newgrf_d).list; c != NULL && i > 0; c = c->next, i--);
+ for (c = *WP(w, newgrf_d).list; c != NULL && i > 0; c = c->next, i--) {}
WP(w, newgrf_d).sel = c;
SetWindowDirty(w);