Skip to content

Commit

Permalink
Cleanup nextafter workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
horenmar committed Feb 16, 2020
1 parent 89f18f1 commit 548de65
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/catch2/catch_matchers_floating.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,8 @@ namespace {
return static_cast<uint64_t>(ulpDiff) <= maxUlpDiff;
}

} //end anonymous namespace

#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) {
return ::nextafterf(x, y);
}
Expand All @@ -77,18 +69,8 @@ namespace {
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 ^^^

namespace {

template <typename FP>
FP step(FP start, FP direction, uint64_t steps) {
for (uint64_t i = 0; i < steps; ++i) {
Expand Down

0 comments on commit 548de65

Please sign in to comment.