summaryrefslogtreecommitdiff
path: root/src/viewport.cpp
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2007-01-11 11:05:01 +0000
committercelestar <celestar@openttd.org>2007-01-11 11:05:01 +0000
commit08de6b082af59087361b5d7e5be67b6e3cd66a82 (patch)
treef9cb6bcd0d0b855706d1e00e0a4ffd2757c7e039 /src/viewport.cpp
parent067784756919b908503541cee9648840ffa04f4c (diff)
downloadopenttd-08de6b082af59087361b5d7e5be67b6e3cd66a82.tar.xz
(svn r8055) -Codechange: Replace the different max, dmax, maxu whatever macros by a simple template function max(), that requires two arguments of the same type. While I'm at it change a variable called "max" to "maxval" in a function that calls max().
Diffstat (limited to 'src/viewport.cpp')
-rw-r--r--src/viewport.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp
index 10670c361..85d4493b1 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -2091,7 +2091,7 @@ static int CalcHeightdiff(HighLightStyle style, uint distance, TileIndex start_t
assert(style_t < lengthof(heightdiff_line_by_dir) - 13);
h0 = TileHeight(TILE_ADD(start_tile, ToTileIndexDiff(heightdiff_line_by_dir[style_t])));
ht = TileHeight(TILE_ADD(start_tile, ToTileIndexDiff(heightdiff_line_by_dir[style_t + 1])));
- h0 = maxu(h0, ht);
+ h0 = max(h0, ht);
/* Use lookup table for end-tile based on HighLightStyle direction
* flip around side (lower/upper, left/right) based on distance */
@@ -2099,7 +2099,7 @@ static int CalcHeightdiff(HighLightStyle style, uint distance, TileIndex start_t
assert(style_t < lengthof(heightdiff_line_by_dir) - 13);
h1 = TileHeight(TILE_ADD(end_tile, ToTileIndexDiff(heightdiff_line_by_dir[12 + style_t])));
ht = TileHeight(TILE_ADD(end_tile, ToTileIndexDiff(heightdiff_line_by_dir[12 + style_t + 1])));
- h1 = maxu(h1, ht);
+ h1 = max(h1, ht);
} break;
}