summaryrefslogtreecommitdiff
path: root/tile.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 /tile.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 'tile.c')
-rw-r--r--tile.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tile.c b/tile.c
index 862acc417..9fe175766 100644
--- a/tile.c
+++ b/tile.c
@@ -41,10 +41,10 @@ uint GetTileSlope(TileIndex tile, uint *h)
if (min >= d) min = d;
r = 0;
- if ((a -= min) != 0) { r += (--a << 4) + 8; }
- if ((c -= min) != 0) { r += (--c << 4) + 4; }
- if ((d -= min) != 0) { r += (--d << 4) + 2; }
- if ((b -= min) != 0) { r += (--b << 4) + 1; }
+ if ((a -= min) != 0) r += (--a << 4) + 8;
+ if ((c -= min) != 0) r += (--c << 4) + 4;
+ if ((d -= min) != 0) r += (--d << 4) + 2;
+ if ((b -= min) != 0) r += (--b << 4) + 1;
if (h != NULL)
*h = min * 8;