summaryrefslogtreecommitdiff
path: root/src/aircraft_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r--src/aircraft_cmd.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index 63252f5a3..475bd7b12 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -652,7 +652,7 @@ static int UpdateAircraftSpeed(Aircraft *v, uint speed_limit = SPEED_LIMIT_NONE,
/* adjust speed for broken vehicles */
if (v->vehstatus & VS_AIRCRAFT_BROKEN) {
if (SPEED_LIMIT_BROKEN < speed_limit) hard_limit = false;
- speed_limit = min(speed_limit, SPEED_LIMIT_BROKEN);
+ speed_limit = std::min<uint>(speed_limit, SPEED_LIMIT_BROKEN);
}
if (v->vcache.cached_max_speed < speed_limit) {
@@ -669,10 +669,10 @@ static int UpdateAircraftSpeed(Aircraft *v, uint speed_limit = SPEED_LIMIT_NONE,
* speeds to that aircraft do not get to taxi speed straight after
* touchdown. */
if (!hard_limit && v->cur_speed > speed_limit) {
- speed_limit = v->cur_speed - max(1, ((v->cur_speed * v->cur_speed) / 16384) / _settings_game.vehicle.plane_speed);
+ speed_limit = v->cur_speed - std::max(1, ((v->cur_speed * v->cur_speed) / 16384) / _settings_game.vehicle.plane_speed);
}
- spd = min(v->cur_speed + (spd >> 8) + (v->subspeed < t), speed_limit);
+ spd = std::min(v->cur_speed + (spd >> 8) + (v->subspeed < t), speed_limit);
/* updates statusbar only if speed have changed to save CPU time */
if (spd != v->cur_speed) {
@@ -737,7 +737,7 @@ void GetAircraftFlightLevelBounds(const Vehicle *v, int *min_level, int *max_lev
}
/* Make faster planes fly higher so that they can overtake slower ones */
- base_altitude += min(20 * (v->vcache.cached_max_speed / 200) - 90, 0);
+ base_altitude += std::min(20 * (v->vcache.cached_max_speed / 200) - 90, 0);
if (min_level != nullptr) *min_level = base_altitude + AIRCRAFT_MIN_FLYING_ALTITUDE;
if (max_level != nullptr) *max_level = base_altitude + AIRCRAFT_MAX_FLYING_ALTITUDE;
@@ -929,7 +929,7 @@ static bool AircraftController(Aircraft *v)
v->cur_speed = 0;
return true;
}
- SetAircraftPosition(v, v->x_pos, v->y_pos, min(v->z_pos + count, z_dest));
+ SetAircraftPosition(v, v->x_pos, v->y_pos, std::min(v->z_pos + count, z_dest));
}
}
return false;
@@ -975,9 +975,9 @@ static bool AircraftController(Aircraft *v)
count = UpdateAircraftSpeed(v);
if (count > 0) {
if (v->z_pos > z) {
- SetAircraftPosition(v, v->x_pos, v->y_pos, max(v->z_pos - count, z));
+ SetAircraftPosition(v, v->x_pos, v->y_pos, std::max(v->z_pos - count, z));
} else {
- SetAircraftPosition(v, v->x_pos, v->y_pos, min(v->z_pos + count, z));
+ SetAircraftPosition(v, v->x_pos, v->y_pos, std::min(v->z_pos + count, z));
}
}
}
@@ -1125,7 +1125,7 @@ static bool AircraftController(Aircraft *v)
/* We're not flying below our destination, right? */
assert(airport_z <= z);
- int t = max(1U, dist - 4);
+ int t = std::max(1U, dist - 4);
int delta = z - airport_z;
/* Only start lowering when we're sufficiently close for a 1:1 glide */