Make it compile with C++11 support.

Reference : https://bugs.webkit.org/show_bug.cgi?id=59249
This commit is contained in:
Julien de Kozak 2014-11-01 18:35:44 +01:00 committed by Robin Gareus
parent 036b6234ac
commit cb8abbe8d2
4 changed files with 39 additions and 15 deletions

View file

@ -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 ();
}