From 0760fe011114fa440275b487eaf766b015f40e5b Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 16 Jun 2016 12:34:31 +0200 Subject: all: split "api" into "api" and "logic" Here, the "logic" module has all the stuff for building one's own graphical user interface. The "api" module has stuff used by other trackers. While at it, each of "api", "logic", and "compat" need their own export headers. This is because of preprocessor symbol clashes. This is all because a change in the "gui"-only dependency required a relink of all the trackers, protocols, and flters. It takes too long when building in the release configuration. With the split, only the "gui" module gets rebuilt. Since it has close to no static dependencies, it's fast enough. --- opentrack-logic/nan.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 opentrack-logic/nan.cpp (limited to 'opentrack-logic/nan.cpp') diff --git a/opentrack-logic/nan.cpp b/opentrack-logic/nan.cpp new file mode 100644 index 00000000..2522ba38 --- /dev/null +++ b/opentrack-logic/nan.cpp @@ -0,0 +1,16 @@ +#include + +#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 -- cgit v1.2.3