From 904367748cd39e7e99e55d6bc38d935e28500768 Mon Sep 17 00:00:00 2001 From: John Emmas Date: Thu, 3 Oct 2013 09:48:19 +0100 Subject: 'gtk2_ardour' - 'std::isinf' + 'std::isnan' are not available in MSVC (at least, not VC8) --- gtk2_ardour/automation_line.cc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'gtk2_ardour/automation_line.cc') 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 + +// '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 #include #include @@ -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; -- cgit v1.2.3