summaryrefslogtreecommitdiff
path: root/graph_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-11-14 19:48:04 +0000
committertron <tron@openttd.org>2005-11-14 19:48:04 +0000
commitf7abff5f963cddfdd134ac52ffd8e72e3ed88f0c (patch)
treea9ba5d4f3c5c47ab3857060c5f95ed482530ed97 /graph_gui.c
parentd8b56c123eab7f7b48f2af3579130e366f6106ab (diff)
downloadopenttd-f7abff5f963cddfdd134ac52ffd8e72e3ed88f0c.tar.xz
(svn r3181) -Bracing
-Indentation -Whitespace -DeMorgan's Law -Test with NULL or 0 for non-booleans -'\0' instead of 0 for chars -Remove redundantly redundant comments (like DoFoo(); // Do foo) -Join multiple short lines with a single statement -Split single lines with multiple statements -Avoid assignments in if
Diffstat (limited to 'graph_gui.c')
-rw-r--r--graph_gui.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/graph_gui.c b/graph_gui.c
index cedca5f46..16329ecb9 100644
--- a/graph_gui.c
+++ b/graph_gui.c
@@ -224,15 +224,13 @@ static void GraphLegendWndProc(Window *w, WindowEvent *e)
switch(e->event) {
case WE_PAINT:
FOR_ALL_PLAYERS(p) {
- if (!p->is_active)
- SETBIT(_legend_excludebits, p->index);
+ if (!p->is_active) SETBIT(_legend_excludebits, p->index);
}
- w->click_state = ((~_legend_excludebits) << 3);
+ w->click_state = (~_legend_excludebits) << 3;
DrawWindowWidgets(w);
FOR_ALL_PLAYERS(p) {
- if (!p->is_active)
- continue;
+ if (!p->is_active) continue;
DrawPlayerIcon(p->index, 4, 18+p->index*12);
@@ -245,7 +243,7 @@ static void GraphLegendWndProc(Window *w, WindowEvent *e)
case WE_CLICK:
if (IS_INT_INSIDE(e->click.widget, 3, 11)) {
- _legend_excludebits ^= (1 << (e->click.widget-3));
+ _legend_excludebits ^= (1 << (e->click.widget - 3));
SetWindowDirty(w);
InvalidateWindow(WC_INCOME_GRAPH, 0);
InvalidateWindow(WC_OPERATING_PROFIT, 0);