From 3b389cb31f77fb86dcab87f8ad979cd852908fba Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 5 Feb 2018 09:34:50 +0100 Subject: compat/nan: retire It was broken for MSVC where isnan doesn't work with fast math. Fall back to `fpclassify'. Adjust usages. --- tracker-udp/ftnoir_tracker_udp.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tracker-udp') diff --git a/tracker-udp/ftnoir_tracker_udp.cpp b/tracker-udp/ftnoir_tracker_udp.cpp index fd627ae1..318683f7 100644 --- a/tracker-udp/ftnoir_tracker_udp.cpp +++ b/tracker-udp/ftnoir_tracker_udp.cpp @@ -8,8 +8,8 @@ #include "ftnoir_tracker_udp.h" #include "api/plugin-api.hpp" -#include "compat/nan.hpp" +#include #include udp::udp() : @@ -48,10 +48,9 @@ void udp::run() progn( for (unsigned i = 0; i < 6; i++) { - if (nanp(last_recv_pose2[i])) - { + int val = std::fpclassify(last_recv_pose2[i]); + if (val == FP_NAN || val == FP_INFINITE) return false; - } } return true; )) -- cgit v1.2.3