diff options
Diffstat (limited to 'src/3rdparty/javascriptcore/JavaScriptCore/runtime/NumberPrototype.cpp')
-rw-r--r-- | src/3rdparty/javascriptcore/JavaScriptCore/runtime/NumberPrototype.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/NumberPrototype.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/NumberPrototype.cpp index 67210fa..584a57f 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/NumberPrototype.cpp +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/NumberPrototype.cpp @@ -157,7 +157,7 @@ JSValue JSC_HOST_CALL numberProtoFuncToString(ExecState* exec, JSObject*, JSValu char s[2048 + 3]; const char* lastCharInString = s + sizeof(s) - 1; double x = v.uncheckedGetNumber(); - if (isnan(x) || isinf(x)) + if (std::isnan(x) || std::isinf(x)) return jsString(exec, UString::from(x)); bool isNegative = x < 0.0; @@ -233,7 +233,7 @@ JSValue JSC_HOST_CALL numberProtoFuncToFixed(ExecState* exec, JSObject*, JSValue int f = static_cast<int>(df); double x = v.uncheckedGetNumber(); - if (isnan(x)) + if (std::isnan(x)) return jsNontrivialString(exec, "NaN"); UString s; @@ -319,7 +319,7 @@ JSValue JSC_HOST_CALL numberProtoFuncToExponential(ExecState* exec, JSObject*, J double x = v.uncheckedGetNumber(); - if (isnan(x) || isinf(x)) + if (std::isnan(x) || std::isinf(x)) return jsString(exec, UString::from(x)); JSValue fractionalDigitsValue = args.at(0); @@ -345,7 +345,7 @@ JSValue JSC_HOST_CALL numberProtoFuncToExponential(ExecState* exec, JSObject*, J decimalAdjust = static_cast<int>(logx); } - if (isnan(x)) + if (std::isnan(x)) return jsNontrivialString(exec, "NaN"); if (x == -0.0) // (-0.0).toExponential() should print as 0 instead of -0 @@ -391,7 +391,7 @@ JSValue JSC_HOST_CALL numberProtoFuncToPrecision(ExecState* exec, JSObject*, JSV double doublePrecision = args.at(0).toIntegerPreserveNaN(exec); double x = v.uncheckedGetNumber(); - if (args.at(0).isUndefined() || isnan(x) || isinf(x)) + if (args.at(0).isUndefined() || std::isnan(x) || std::isinf(x)) return jsString(exec, v.toString(exec)); UString s; |