summaryrefslogtreecommitdiffhomepage
path: root/opentrack-compat
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-07-19 07:08:44 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-07-19 07:38:37 +0200
commit223ff7abf556d7af4b1aeb63a4dc1664fd9d6161 (patch)
tree17f7394db63f2213bcff133ea28a94012de2635b /opentrack-compat
parent0773f40c072bdf117fff9e7179849b65737e7491 (diff)
tracker/pt: check for nan before writing pose
Diffstat (limited to 'opentrack-compat')
-rw-r--r--opentrack-compat/nan.cpp7
-rw-r--r--opentrack-compat/nan.hpp2
2 files changed, 5 insertions, 4 deletions
diff --git a/opentrack-compat/nan.cpp b/opentrack-compat/nan.cpp
index 6c4b1f6d..899b907a 100644
--- a/opentrack-compat/nan.cpp
+++ b/opentrack-compat/nan.cpp
@@ -1,11 +1,12 @@
#include <cmath>
+#include "export.hpp"
#if defined(__GNUC__)
-extern "C" bool __attribute__ ((noinline)) nanp(double value)
+extern "C" OPENTRACK_COMPAT_EXPORT bool __attribute__ ((noinline)) nanp(double value)
#elif defined(_WIN32)
-extern "C" __declspec(noinline) bool nanp(double value)
+extern "C" OPENTRACK_COMPAT_EXPORT __declspec(noinline) bool nanp(double value)
#else
-extern "C" bool nanp(double value)
+extern "C" OPENTRACK_COMPAT_EXPORT bool nanp(double value)
#endif
{
using std::isnan;
diff --git a/opentrack-compat/nan.hpp b/opentrack-compat/nan.hpp
index f9e5cc1e..9926da13 100644
--- a/opentrack-compat/nan.hpp
+++ b/opentrack-compat/nan.hpp
@@ -5,7 +5,7 @@
#if defined(__GNUC__)
extern "C" OPENTRACK_COMPAT_EXPORT bool __attribute__ ((noinline)) nanp(double value);
#elif defined(_WIN32)
-extern "C" __declspec(noinline) OPENTRACK_COMPAT_EXPORT bool nanp(double value);
+extern "C" OPENTRACK_COMPAT_EXPORT __declspec(noinline) bool nanp(double value);
#else
extern "C" OPENTRACK_COMPAT_EXPORT bool nanp(double value);
#endif