summaryrefslogtreecommitdiff
path: root/src/aircraft_cmd.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/aircraft_cmd.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/aircraft_cmd.cpp')
-rw-r--r--src/aircraft_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index 16c4edfab..b694d7247 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -1066,7 +1066,7 @@ static bool AircraftController(Vehicle *v)
if (curz > z) {
z++;
} else {
- int t = max(1, dist - 4);
+ int t = max(1U, dist - 4);
z -= ((z - curz) + t - 1) / t;
if (z < curz) z = curz;