From 68c280bef8fa5033c36849c463c536176747d75a Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sun, 5 Mar 2017 16:58:28 +0000 Subject: [PATCH] Ifdef out expensive assert in non-debug mode. The vehicle slope algorithm goes to pains to avoid GetSlopePixelZ, but then calls it anyway in the assert... --- src/ground_vehicle.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ground_vehicle.hpp b/src/ground_vehicle.hpp index 67676fb919..346ee82d13 100644 --- a/src/ground_vehicle.hpp +++ b/src/ground_vehicle.hpp @@ -225,7 +225,9 @@ struct GroundVehicle : public SpecializedVehicle { this->z_pos += HasBit(this->gv_flags, GVF_GOINGUP_BIT) ? d : -d; } +#ifdef _DEBUG assert(this->z_pos == GetSlopePixelZ(this->x_pos, this->y_pos)); +#endif } /**