summaryrefslogtreecommitdiff
path: root/src/newgrf_spritegroup.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
commit2ac0410767683fb0e6315433f9805712cb85f5bd (patch)
treef9cb6bcd0d0b855706d1e00e0a4ffd2757c7e039 /src/newgrf_spritegroup.cpp
parent7996c9e560f61cddba0a3ad48b95c81d9030ef99 (diff)
downloadopenttd-2ac0410767683fb0e6315433f9805712cb85f5bd.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/newgrf_spritegroup.cpp')
-rw-r--r--src/newgrf_spritegroup.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf_spritegroup.cpp b/src/newgrf_spritegroup.cpp
index dd212935c..db23fb708 100644
--- a/src/newgrf_spritegroup.cpp
+++ b/src/newgrf_spritegroup.cpp
@@ -114,8 +114,8 @@ static U EvalAdjustT(const DeterministicSpriteGroupAdjust *adjust, U last_value,
switch (adjust->operation) {
case DSGA_OP_ADD: return last_value + value;
case DSGA_OP_SUB: return last_value - value;
- case DSGA_OP_SMIN: return min(last_value, value);
- case DSGA_OP_SMAX: return max(last_value, value);
+ case DSGA_OP_SMIN: return min((S)last_value, (S)value);
+ case DSGA_OP_SMAX: return max((S)last_value, (S)value);
case DSGA_OP_UMIN: return min((U)last_value, (U)value);
case DSGA_OP_UMAX: return max((U)last_value, (U)value);
case DSGA_OP_SDIV: return last_value / value;