mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Make directCompare TU-local to stats.cpp
This commit is contained in:
parent
aafe09bc1c
commit
56fcd584c1
@ -184,6 +184,19 @@ namespace Catch {
|
|||||||
return std::sqrt( variance );
|
return std::sqrt( variance );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined( __GNUC__ ) || defined( __clang__ )
|
||||||
|
# pragma GCC diagnostic push
|
||||||
|
# pragma GCC diagnostic ignored "-Wfloat-equal"
|
||||||
|
#endif
|
||||||
|
// Used when we know we want == comparison of two doubles
|
||||||
|
// to centralize warning suppression
|
||||||
|
static bool directCompare( double lhs, double rhs ) {
|
||||||
|
return lhs == rhs;
|
||||||
|
}
|
||||||
|
#if defined( __GNUC__ ) || defined( __clang__ )
|
||||||
|
# pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
} // namespace Detail
|
} // namespace Detail
|
||||||
} // namespace Benchmark
|
} // namespace Benchmark
|
||||||
@ -193,15 +206,6 @@ namespace Catch {
|
|||||||
namespace Benchmark {
|
namespace Benchmark {
|
||||||
namespace Detail {
|
namespace Detail {
|
||||||
|
|
||||||
#if defined( __GNUC__ ) || defined( __clang__ )
|
|
||||||
# pragma GCC diagnostic push
|
|
||||||
# pragma GCC diagnostic ignored "-Wfloat-equal"
|
|
||||||
#endif
|
|
||||||
bool directCompare( double lhs, double rhs ) { return lhs == rhs; }
|
|
||||||
#if defined( __GNUC__ ) || defined( __clang__ )
|
|
||||||
# pragma GCC diagnostic pop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
double weighted_average_quantile( int k,
|
double weighted_average_quantile( int k,
|
||||||
int q,
|
int q,
|
||||||
double* first,
|
double* first,
|
||||||
|
@ -20,10 +20,6 @@ namespace Catch {
|
|||||||
namespace Detail {
|
namespace Detail {
|
||||||
using sample = std::vector<double>;
|
using sample = std::vector<double>;
|
||||||
|
|
||||||
// Used when we know we want == comparison of two doubles
|
|
||||||
// to centralize warning suppression
|
|
||||||
bool directCompare( double lhs, double rhs );
|
|
||||||
|
|
||||||
double weighted_average_quantile( int k,
|
double weighted_average_quantile( int k,
|
||||||
int q,
|
int q,
|
||||||
double* first,
|
double* first,
|
||||||
|
Loading…
Reference in New Issue
Block a user