Commit 061c747b authored by Alexandre Julliard's avatar Alexandre Julliard

jscript: Use the standard isfinite() function.

parent 1f273618
......@@ -238,7 +238,7 @@ static HRESULT JSGlobal_isFinite(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags,
if(FAILED(hres))
return hres;
ret = is_finite(n);
ret = isfinite(n);
}
if(r)
......
......@@ -364,7 +364,6 @@ HRESULT variant_change_type(script_ctx_t*,VARIANT*,VARIANT*,VARTYPE) DECLSPEC_HI
HRESULT decode_source(WCHAR*) DECLSPEC_HIDDEN;
HRESULT double_to_string(double,jsstr_t**) DECLSPEC_HIDDEN;
BOOL is_finite(double) DECLSPEC_HIDDEN;
static inline BOOL is_digit(WCHAR c)
{
......
......@@ -700,7 +700,7 @@ static HRESULT stringify(stringify_ctx_t *ctx, jsval_t val)
}
case JSV_NUMBER: {
double n = get_number(value);
if(is_finite(n)) {
if(isfinite(n)) {
const WCHAR *ptr;
jsstr_t *str;
......
......@@ -51,11 +51,6 @@ const char *debugstr_jsval(const jsval_t v)
return NULL;
}
BOOL is_finite(double n)
{
return !isnan(n) && !isinf(n);
}
#define MIN_BLOCK_SIZE 128
#define ARENA_FREE_FILLER 0xaa
......
......@@ -247,7 +247,7 @@ static HRESULT Number_toString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, u
val = number->value;
if(radix==10 || !is_finite(val)) {
if(radix==10 || !isfinite(val)) {
hres = to_string(ctx, jsval_number(val), &str);
if(FAILED(hres))
return hres;
......@@ -373,7 +373,7 @@ static HRESULT Number_toFixed(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, un
}
val = number->value;
if(!is_finite(val)) {
if(!isfinite(val)) {
hres = to_string(ctx, jsval_number(val), &str);
if(FAILED(hres))
return hres;
......@@ -414,7 +414,7 @@ static HRESULT Number_toExponential(script_ctx_t *ctx, vdisp_t *jsthis, WORD fla
}
val = number->value;
if(!is_finite(val)) {
if(!isfinite(val)) {
hres = to_string(ctx, jsval_number(val), &str);
if(FAILED(hres))
return hres;
......@@ -455,7 +455,7 @@ static HRESULT Number_toPrecision(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags
}
val = number->value;
if(!is_finite(val) || !prec) {
if(!isfinite(val) || !prec) {
hres = to_string(ctx, jsval_number(val), &str);
if(FAILED(hres))
return hres;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment