summaryrefslogtreecommitdiffhomepage
path: root/opentrack-logic
diff options
context:
space:
mode:
Diffstat (limited to 'opentrack-logic')
-rw-r--r--opentrack-logic/CMakeLists.txt3
-rw-r--r--opentrack-logic/nan.cpp16
-rw-r--r--opentrack-logic/nan.hpp9
-rw-r--r--opentrack-logic/tracker.cpp2
4 files changed, 1 insertions, 29 deletions
diff --git a/opentrack-logic/CMakeLists.txt b/opentrack-logic/CMakeLists.txt
index edcc27b3..87175454 100644
--- a/opentrack-logic/CMakeLists.txt
+++ b/opentrack-logic/CMakeLists.txt
@@ -5,6 +5,3 @@ if(NOT WIN32)
else()
target_link_libraries(opentrack-logic winmm)
endif()
-if(CMAKE_COMPILER_IS_GNUCXX)
- set_source_files_properties(nan.cpp PROPERTIES COMPILE_FLAGS "-fno-fast-math -fno-finite-math-only -fno-fast-math -O2")
-endif()
diff --git a/opentrack-logic/nan.cpp b/opentrack-logic/nan.cpp
deleted file mode 100644
index 2522ba38..00000000
--- a/opentrack-logic/nan.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <cmath>
-
-#if defined(__GNUC__)
-bool __attribute__ ((noinline)) nanp(double value)
-#elif defined(_WIN32)
-__declspec(noinline) bool nanp(double value)
-#else
-bool nanp(double value)
-#endif
-{
- using std::isnan;
- using std::isinf;
-
- const volatile double x = value;
- return isnan(x) || isinf(x);
-} \ No newline at end of file
diff --git a/opentrack-logic/nan.hpp b/opentrack-logic/nan.hpp
deleted file mode 100644
index c17cabfd..00000000
--- a/opentrack-logic/nan.hpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#pragma once
-
-#if defined(__GNUC__)
-bool __attribute__ ((noinline)) nanp(double value);
-#elif defined(_WIN32)
-__declspec(noinline) bool nanp(double value);
-#else
-bool nanp(double value);
-#endif
diff --git a/opentrack-logic/tracker.cpp b/opentrack-logic/tracker.cpp
index 4fcce853..39e70005 100644
--- a/opentrack-logic/tracker.cpp
+++ b/opentrack-logic/tracker.cpp
@@ -62,7 +62,7 @@ void Tracker::t_compensate(const rmat& rmat, const double* xyz, double* output,
output[0] = -ret(1);
}
-#include "nan.hpp"
+#include "opentrack-compat/nan.hpp"
static inline double elide_nan(double value, double def)
{