summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2021-03-12 16:52:53 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2021-03-12 16:52:53 +0800
commit9ef3a1994ade95c00d1c4967269cb9f27b66dbd7 (patch)
treede29efc067634774836a1920661cc219fb5cab51
parent66d738336da15d869411bab4781ff020444d03c8 (diff)
downloadgjs-msvc.fixes.tar.gz
gi/js-value-inl.h: Cast parameter to std::isnan() to floatmsvc.fixes
This way, we avoid ambiguity compiler errors...
-rw-r--r--gi/js-value-inl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gi/js-value-inl.h b/gi/js-value-inl.h
index 7a73b72e..01fde1e5 100644
--- a/gi/js-value-inl.h
+++ b/gi/js-value-inl.h
@@ -214,7 +214,7 @@ GJS_JSAPI_RETURN_CONVENTION inline bool js_value_to_c_checked(
static_cast<T>(std::numeric_limits<WantedType>::lowest()));
if constexpr (std::is_integral_v<WantedType>)
- *out_of_range |= std::isnan(*out);
+ *out_of_range |= std::isnan(static_cast<float>(*out));
}
return ret;
}