diff options
author | rene <rene@FreeBSD.org> | 2013-09-15 17:47:08 +0800 |
---|---|---|
committer | rene <rene@FreeBSD.org> | 2013-09-15 17:47:08 +0800 |
commit | c97c15dd9c18b892979fae4c411196ee392219f6 (patch) | |
tree | d0f9087a7b862edd404d93f2c95a47558fe80e9f | |
parent | e639c2cb74dbe68cb2f9f9b32507e1fb38fbed3c (diff) | |
download | freebsd-ports-gnome-c97c15dd9c18b892979fae4c411196ee392219f6.tar.gz freebsd-ports-gnome-c97c15dd9c18b892979fae4c411196ee392219f6.tar.zst freebsd-ports-gnome-c97c15dd9c18b892979fae4c411196ee392219f6.zip |
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.
-rw-r--r-- | games/torcs/files/patch-src__modules__simu__simuv2__simu.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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 */ |