Remove custom implementations of isinf and isnan

Use the ones from the <cmath> header instead, now that that is available
on all the currently supported versions of MSVC.
This commit is contained in:
Arcady Goldmints-Orlov 2023-11-17 12:40:50 -05:00 committed by arcady-lunarg
parent 6b72472f28
commit f6cc939499
3 changed files with 4 additions and 32 deletions

View file

@ -292,34 +292,6 @@ template <class T> int IntLog2(T n)
return result;
}
inline bool IsInfinity(double x) {
#ifdef _MSC_VER
switch (_fpclass(x)) {
case _FPCLASS_NINF:
case _FPCLASS_PINF:
return true;
default:
return false;
}
#else
return std::isinf(x);
#endif
}
inline bool IsNan(double x) {
#ifdef _MSC_VER
switch (_fpclass(x)) {
case _FPCLASS_SNAN:
case _FPCLASS_QNAN:
return true;
default:
return false;
}
#else
return std::isnan(x);
#endif
}
} // end namespace glslang
#endif // _COMMON_INCLUDED_