summaryrefslogtreecommitdiffhomepage
path: root/tracker-udp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-02-05 09:34:50 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-02-05 10:16:37 +0100
commit3b389cb31f77fb86dcab87f8ad979cd852908fba (patch)
tree9d70fde118c689c535d39eaf6b85b350a39cddce /tracker-udp
parent0d82a0ccc3c9bb49f28f18e7460a5366e06516bc (diff)
compat/nan: retire
It was broken for MSVC where isnan doesn't work with fast math. Fall back to `fpclassify'. Adjust usages.
Diffstat (limited to 'tracker-udp')
-rw-r--r--tracker-udp/ftnoir_tracker_udp.cpp7
1 files changed, 3 insertions, 4 deletions
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 <cmath>
#include <iterator>
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;
))