diff options
author | Julien de Kozak <jdekozak@hotmail.com> | 2014-11-01 18:35:44 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-12-01 23:18:11 +0100 |
commit | cb8abbe8d2f0e4dfe52bd35613ebba7689628eca (patch) | |
tree | cd6ef56b6c2af7c1aeda26d3d2afd200c4dabf89 /gtk2_ardour | |
parent | 036b6234acdbf892171c1cbfa99efb823d6ebc58 (diff) |
Make it compile with C++11 support.
Reference : https://bugs.webkit.org/show_bug.cgi?id=59249
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/automation_line.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc index e87dce8367..69c74f7ab7 100644 --- a/gtk2_ardour/automation_line.cc +++ b/gtk2_ardour/automation_line.cc @@ -17,14 +17,17 @@ */ +#include <cmath> + #ifdef COMPILER_MSVC #include <float.h> -/* isinf() & isnan() are C99 standards, which older MSVC doesn't provide */ -#define isinf(val) !((bool)_finite((double)val)) -#define isnan(val) (bool)_isnan((double)val) + +// 'std::isnan()' is not available in MSVC. +#define isnan_local(val) (bool)_isnan((double)val) +#else +#define isnan_local std::isnan #endif -#include <cmath> #include <climits> #include <vector> #include <fstream> @@ -976,7 +979,7 @@ AutomationLine::reset_callback (const Evoral::ControlList& events) model_to_view_coord (tx, ty); - if (isnan (tx) || isnan (ty)) { + if (isnan_local (tx) || isnan_local (ty)) { warning << string_compose (_("Ignoring illegal points on AutomationLine \"%1\""), _name) << endmsg; continue; |