Bug 1660405 - Move away from mozilla::IsNaN in favor of std::isnan. r=nbp,media-playback-reviewers,sergesanspaille,padenot

Differential Revision: https://phabricator.services.mozilla.com/D173035
This commit is contained in:
Andi-Bogdan Postelnicu
2023-03-22 09:27:56 +00:00
parent c3ec76bdbc
commit 5e0156c1e4
90 changed files with 236 additions and 253 deletions

View File

@@ -463,7 +463,7 @@ static float ParsePrefFloat(const nsCString& aString, nsresult* aError) {
// Defensively avoid potential breakage caused by returning NaN into
// unsuspecting code. AFAIK this should never happen as PR_strtod cannot
// return NaN as currently configured.
if (mozilla::IsNaN(result)) {
if (std::isnan(result)) {
MOZ_ASSERT_UNREACHABLE("PR_strtod shouldn't return NaN");
*aError = NS_ERROR_ILLEGAL_VALUE;
return 0.f;