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 /libs/evoral/src | |
parent | 036b6234acdbf892171c1cbfa99efb823d6ebc58 (diff) |
Make it compile with C++11 support.
Reference : https://bugs.webkit.org/show_bug.cgi?id=59249
Diffstat (limited to 'libs/evoral/src')
-rw-r--r-- | libs/evoral/src/ControlList.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libs/evoral/src/ControlList.cpp b/libs/evoral/src/ControlList.cpp index 5d85dfa407..0876cdef28 100644 --- a/libs/evoral/src/ControlList.cpp +++ b/libs/evoral/src/ControlList.cpp @@ -17,6 +17,16 @@ */ #include <cmath> + +#ifdef COMPILER_MSVC +#include <float.h> + +// 'std::isnan()' is not available in MSVC. +#define isnan_local(val) (bool)_isnan((double)val) +#else +#define isnan_local std::isnan +#endif + #include <cassert> #include <utility> #include <iostream> @@ -837,8 +847,7 @@ ControlList::modify (iterator iter, double when, double val) (*iter)->when = when; (*iter)->value = val; - - if (isnan (val)) { + if (isnan_local (val)) { abort (); } |