diff options
author | rubidium <rubidium@openttd.org> | 2009-01-09 22:56:28 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-01-09 22:56:28 +0000 |
commit | c0e7434f3815e73a28e1cfe9a9b0d4eb4bf6d40b (patch) | |
tree | 378bc97d52ab0658bfed8695d1ce2f01bf572802 /src/ai | |
parent | 054787f08252150eac44afe15d413a478b00154a (diff) | |
download | openttd-c0e7434f3815e73a28e1cfe9a9b0d4eb4bf6d40b.tar.xz |
(svn r14944) -Cleanup: add spaces around some operators
Diffstat (limited to 'src/ai')
-rw-r--r-- | src/ai/default/default.cpp | 2 | ||||
-rw-r--r-- | src/ai/trolly/build.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp index 398fc2b6b..4e7fecd25 100644 --- a/src/ai/default/default.cpp +++ b/src/ai/default/default.cpp @@ -3401,7 +3401,7 @@ static void AiStateAirportStuff(Company *c) static CommandCost AiDoBuildDefaultAirportBlock(TileIndex tile, const AiDefaultBlockData *p, byte flag) { uint32 avail_airports = GetValidAirports(); - CommandCost ret,total_cost(EXPENSES_CONSTRUCTION); + CommandCost ret, total_cost(EXPENSES_CONSTRUCTION); for (; p->mode == 0; p++) { if (!HasBit(avail_airports, p->attr)) return CMD_ERROR; diff --git a/src/ai/trolly/build.cpp b/src/ai/trolly/build.cpp index e1f4b9980..0723386f7 100644 --- a/src/ai/trolly/build.cpp +++ b/src/ai/trolly/build.cpp @@ -64,7 +64,7 @@ CommandCost AiNew_Build_Bridge(Company *c, TileIndex tile_a, TileIndex tile_b, b // Find a good bridgetype (the best money can buy) bridge_len = GetTunnelBridgeLength(tile_a, tile_b); type = type2 = 0; - for (bridge_type = MAX_BRIDGES-1; bridge_type >= 0; bridge_type--) { + for (bridge_type = MAX_BRIDGES - 1; bridge_type >= 0; bridge_type--) { if (CheckBridge_Stuff(bridge_type, bridge_len)) { type2 = type; type = bridge_type; @@ -142,7 +142,7 @@ CommandCost AiNew_Build_RoutePart(Company *c, Ai_PathFinderInfo *PathFinderInfo, if (route_extra[part - 1] == 0 && route_extra[part] == 0) { while (route_extra[part] == 0) { // Get the current direction - dir = AiNew_GetRailDirection(route[part-1], route[part], route[part+1]); + dir = AiNew_GetRailDirection(route[part - 1], route[part], route[part + 1]); // Is it the same as the last one? if (old_dir != -1 && old_dir != dir) break; old_dir = dir; @@ -191,10 +191,10 @@ CommandCost AiNew_Build_RoutePart(Company *c, Ai_PathFinderInfo *PathFinderInfo, // Keep it doing till we go an other way // EnsureNoVehicleOnGround makes sure we don't build on a tile where a vehicle is. This way // it will wait till the vehicle is gone.. - if (route_extra[part-1] == 0 && route_extra[part] == 0 && (flag != DC_EXEC || EnsureNoVehicleOnGround(route[part]))) { + if (route_extra[part - 1] == 0 && route_extra[part] == 0 && (flag != DC_EXEC || EnsureNoVehicleOnGround(route[part]))) { while (route_extra[part] == 0 && (flag != DC_EXEC || EnsureNoVehicleOnGround(route[part]))) { // Get the current direction - dir = AiNew_GetRoadDirection(route[part-1], route[part], route[part+1]); + dir = AiNew_GetRoadDirection(route[part - 1], route[part], route[part + 1]); // Is it the same as the last one? if (old_dir != -1 && old_dir != dir) break; old_dir = dir; |