Cleanup nextafter workaround

This commit is contained in:
Martin Hořeňovský 2020-02-03 10:05:17 +01:00
parent 89f18f15ca
commit 548de655fd
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A

View File

@ -59,16 +59,8 @@ namespace {
return static_cast<uint64_t>(ulpDiff) <= maxUlpDiff; return static_cast<uint64_t>(ulpDiff) <= maxUlpDiff;
} }
} //end anonymous namespace
#if defined(CATCH_CONFIG_GLOBAL_NEXTAFTER) #if defined(CATCH_CONFIG_GLOBAL_NEXTAFTER)
#if defined(__clang__)
#pragma clang diagnostic push
// The long double overload is currently unused
#pragma clang diagnostic ignored "-Wunused-function"
#endif
float nextafter(float x, float y) { float nextafter(float x, float y) {
return ::nextafterf(x, y); return ::nextafterf(x, y);
} }
@ -77,18 +69,8 @@ namespace {
return ::nextafter(x, y); return ::nextafter(x, y);
} }
long double nextafter(long double x, long double y) {
return ::nextafterl(x, y);
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
#endif // ^^^ CATCH_CONFIG_GLOBAL_NEXTAFTER ^^^ #endif // ^^^ CATCH_CONFIG_GLOBAL_NEXTAFTER ^^^
namespace {
template <typename FP> template <typename FP>
FP step(FP start, FP direction, uint64_t steps) { FP step(FP start, FP direction, uint64_t steps) {
for (uint64_t i = 0; i < steps; ++i) { for (uint64_t i = 0; i < steps; ++i) {