From c97c15dd9c18b892979fae4c411196ee392219f6 Mon Sep 17 00:00:00 2001 From: rene Date: Sun, 15 Sep 2013 09:47:08 +0000 Subject: Fix build with libc++ isnan() and isinf() do not like integer arguments, so remove two offending tests. These tests would always evaluate to false anyway because integers cannot express NaN nor infinity. --- games/torcs/files/patch-src__modules__simu__simuv2__simu.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 games/torcs/files/patch-src__modules__simu__simuv2__simu.cpp (limited to 'games/torcs') diff --git a/games/torcs/files/patch-src__modules__simu__simuv2__simu.cpp b/games/torcs/files/patch-src__modules__simu__simuv2__simu.cpp new file mode 100644 index 000000000000..d4099d285e5a --- /dev/null +++ b/games/torcs/files/patch-src__modules__simu__simuv2__simu.cpp @@ -0,0 +1,10 @@ +--- ./src/modules/simu/simuv2/simu.cpp.orig 2012-10-03 07:18:49.000000000 +0000 ++++ ./src/modules/simu/simuv2/simu.cpp 2013-09-15 09:29:34.000000000 +0000 +@@ -67,7 +67,6 @@ + if (isnan(car->ctrl->brakeCmd) || isinf(car->ctrl->brakeCmd)) car->ctrl->brakeCmd = 0; + if (isnan(car->ctrl->clutchCmd) || isinf(car->ctrl->clutchCmd)) car->ctrl->clutchCmd = 0; + if (isnan(car->ctrl->steer) || isinf(car->ctrl->steer)) car->ctrl->steer = 0; +- if (isnan(car->ctrl->gear) || isinf(car->ctrl->gear)) car->ctrl->gear = 0; + #endif + + /* When the car is broken try to send it on the track side */ -- cgit