diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-01-10 16:07:57 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-01-10 16:07:57 -0500 |
commit | 3020b224fa2d6e1b6b8a576e8e8e211e0585f2a2 (patch) | |
tree | 314c3099bcc57d9af09d249e1e7dd8e45baca642 /gtk2_ardour/automation_line.cc | |
parent | d15fda6d751a465d278f477923075d4783f3b1ca (diff) | |
parent | 897fbdc652434d3aa1e67223c3c3ef7ae9be2318 (diff) |
Merge windows+cc branch into cairocanvas branch. Not finished, need to now merge windows branch to get changes from there
Diffstat (limited to 'gtk2_ardour/automation_line.cc')
-rw-r--r-- | gtk2_ardour/automation_line.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc index eee0689c35..2551b40c75 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> @@ -949,7 +960,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; |