(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
This commit is contained in:
tron
2005-10-23 13:04:44 +00:00
parent 2cc2154ad2
commit 47137cefb7
38 changed files with 442 additions and 453 deletions

View File

@@ -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);
}