summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_line.cc
diff options
context:
space:
mode:
authorJohn Emmas <johne53@tiscali.co.uk>2013-10-03 09:48:19 +0100
committerJohn Emmas <johne53@tiscali.co.uk>2013-10-03 09:48:19 +0100
commit904367748cd39e7e99e55d6bc38d935e28500768 (patch)
tree01787e28893afa831216cd7a7fe2719a7404890a /gtk2_ardour/automation_line.cc
parentf763e370c517437c7f8ba09a73632397df5e36ba (diff)
'gtk2_ardour' - 'std::isinf' + 'std::isnan' are not available in MSVC (at least, not VC8)
Diffstat (limited to 'gtk2_ardour/automation_line.cc')
-rw-r--r--gtk2_ardour/automation_line.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc
index 17e0792477..94ca7802f0 100644
--- a/gtk2_ardour/automation_line.cc
+++ b/gtk2_ardour/automation_line.cc
@@ -17,6 +17,17 @@
*/
+#ifdef COMPILER_MSVC
+#include <float.h>
+
+// 'std::isinf()' and 'std::isnan()' are not available in MSVC.
+#define isinf(val) !((bool)_finite((double)val))
+#define isnan(val) (bool)_isnan((double)val)
+#else
+using std::isnan;
+using std::isinf;
+#endif
+
#include <cmath>
#include <climits>
#include <vector>
@@ -933,7 +944,7 @@ AutomationLine::reset_callback (const Evoral::ControlList& events)
model_to_view_coord (tx, ty);
- if (std::isnan (tx) || std::isnan (ty)) {
+ if (isnan (tx) || isnan (ty)) {
warning << string_compose (_("Ignoring illegal points on AutomationLine \"%1\""),
_name) << endmsg;
continue;