summaryrefslogtreecommitdiff
path: root/newgrf.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
commit181d586a7c13a296a1b9355e15e55dda7ac0fcb2 (patch)
tree7a8d1fbbe0d0d6ee2c8e981c57be6a9003505e97 /newgrf.c
parent0b936c3222b3945f738885c6c7db3b46363ec6fe (diff)
downloadopenttd-181d586a7c13a296a1b9355e15e55dda7ac0fcb2.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 'newgrf.c')
-rw-r--r--newgrf.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/newgrf.c b/newgrf.c
index 482cc5e57..b745522ed 100644
--- a/newgrf.c
+++ b/newgrf.c
@@ -258,15 +258,9 @@ static bool RailVehicleChangeInfo(uint engine, int numinfo, int prop, byte **buf
uint32 base = grf_load_dword(&buf);
switch (base) {
- case 0x4C30:
- rvi[i].engclass = 0;
- break;
- case 0x4C36:
- rvi[i].engclass = 1;
- break;
- case 0x4C3C:
- rvi[i].engclass = 2;
- break;
+ case 0x4C30: rvi[i].engclass = 0; break;
+ case 0x4C36: rvi[i].engclass = 1; break;
+ case 0x4C3C: rvi[i].engclass = 2; break;
}
dewagonize(base, engine + i);
}