From df950b87e781daf92364afb22f13d87b18858c80 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 4 Aug 2017 11:33:49 -0700 Subject: Remove platform-specific IsFinite, JS_PortIsNan, and GetNan. Because C++11 gives us std::isfinite(), std::isnan() and std::nan(). Bug: pdfium:459 Change-Id: I128f332ec908df6aff66ef76012288fd22d423ed Reviewed-on: https://pdfium-review.googlesource.com/10190 Reviewed-by: Lei Zhang Commit-Queue: Tom Sepez --- fpdfsdk/javascript/util.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fpdfsdk/javascript/util.cpp') diff --git a/fpdfsdk/javascript/util.cpp b/fpdfsdk/javascript/util.cpp index 93e178e9b7..e00f9e1560 100644 --- a/fpdfsdk/javascript/util.cpp +++ b/fpdfsdk/javascript/util.cpp @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -395,7 +396,7 @@ bool util::scand(CJS_Runtime* pRuntime, dDate = CJS_PublicMethods::MakeRegularDate(sDate, sFormat, nullptr); } - if (!JS_PortIsNan(dDate)) { + if (!std::isnan(dDate)) { vRet = CJS_Value(pRuntime, CJS_Date(pRuntime, dDate)); } else { vRet.SetNull(pRuntime); -- cgit v1.2.3