diff options
author | tron <tron@openttd.org> | 2005-10-23 13:04:44 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-10-23 13:04:44 +0000 |
commit | 47137cefb72d3b3d3bc6fdefc7a4b103429f6d46 (patch) | |
tree | 7a8d1fbbe0d0d6ee2c8e981c57be6a9003505e97 /ai/trolly/build.c | |
parent | 2cc2154ad26b96b032df2f4fca0ce1634e6330b2 (diff) | |
download | openttd-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 'ai/trolly/build.c')
-rw-r--r-- | ai/trolly/build.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ai/trolly/build.c b/ai/trolly/build.c index 80f0fdf1b..bc173892c 100644 --- a/ai/trolly/build.c +++ b/ai/trolly/build.c @@ -229,7 +229,7 @@ int AiNew_PickVehicle(Player *p) count = _cargoc.ai_roadveh_count[p->ainew.cargo]; // Let's check it backwards.. we simply want to best engine available.. - for (i=start+count-1;i>=start;i--) { + for (i = start + count - 1; i >= start; i--) { // Is it availiable? // Also, check if the reliability of the vehicle is above the AI_VEHICLE_MIN_RELIABILTY if (!HASBIT(GetEngine(i)->player_avail, _current_player) || GetEngine(i)->reliability * 100 < AI_VEHICLE_MIN_RELIABILTY << 16) continue; @@ -238,7 +238,7 @@ int AiNew_PickVehicle(Player *p) if (!CmdFailed(ret)) break; } // We did not find a vehicle :( - if (CmdFailed(ret)) { return -1; } + if (CmdFailed(ret)) return -1; return i; } } |