summaryrefslogtreecommitdiff
path: root/town_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-10-23 13:04:44 +0000
committertron <tron@openttd.org>2005-10-23 13:04:44 +0000
commit47137cefb72d3b3d3bc6fdefc7a4b103429f6d46 (patch)
tree7a8d1fbbe0d0d6ee2c8e981c57be6a9003505e97 /town_gui.c
parent2cc2154ad26b96b032df2f4fca0ce1634e6330b2 (diff)
downloadopenttd-47137cefb72d3b3d3bc6fdefc7a4b103429f6d46.tar.xz
(svn r3078) Some more stuff, which piled up:
- const, whitespace, indentation, bracing, GB/SB, pointless casts - use the trinary operator where appropriate - data types (uint[] -> AcceptedCargo, ...) - if cascade -> switch - if (ptr) -> if (ptr != NULL) - DeMorgan's Law - Fix some comments - 0 -> '\0', change magic numbers to symbolic constants
Diffstat (limited to 'town_gui.c')
-rw-r--r--town_gui.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/town_gui.c b/town_gui.c
index f5d6e9a57..a348bf27c 100644
--- a/town_gui.c
+++ b/town_gui.c
@@ -455,7 +455,7 @@ static void TownDirectoryWndProc(Window *w, WindowEvent *e)
y += 10;
i++;
- if (++n == w->vscroll.cap) { break;} // max number of towns in 1 window
+ if (++n == w->vscroll.cap) break; // max number of towns in 1 window
}
SetDParam(0, GetWorldPopulation());
DrawString(3, w->height - 12 + 2, STR_TOWN_POPULATION, 0);
@@ -479,11 +479,11 @@ static void TownDirectoryWndProc(Window *w, WindowEvent *e)
case 5: { /* Click on Town Matrix */
uint16 id_v = (e->click.pt.y - 28) / 10;
- if (id_v >= w->vscroll.cap) { return;} // click out of bounds
+ if (id_v >= w->vscroll.cap) return; // click out of bounds
id_v += w->vscroll.pos;
- if (id_v >= _num_town_sort) { return;} // click out of town bounds
+ if (id_v >= _num_town_sort) return; // click out of town bounds
{
Town *t = GetTown(_town_sort[id_v]);