Чистка кода

This commit is contained in:
2020-03-30 14:13:27 +03:00
parent 44466b80de
commit 8f7a08bea6
6 changed files with 17 additions and 10 deletions

View File

@ -22,12 +22,14 @@ bool almost_equal_ulps_and_abs( const float a, const float b,
float_cmp_t uB( b );
// Different signs means they do not match.
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access)
if ( uA.negative() != uB.negative() )
{
return( false );
}
// Find the difference in ULPs.
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access)
int ulpsDiff = std::abs( uA.i - uB.i );
if ( ulpsDiff <= maxUlpsDiff )
{
@ -53,12 +55,14 @@ bool almost_equal_ulps_and_abs( const double a, const double b,
double_cmp_t uB( b );
// Different signs means they do not match.
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access)
if ( uA.negative() != uB.negative() )
{
return( false );
}
// Find the difference in ULPs.
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-union-access)
auto ulpsDiff = std::abs( uA.i - uB.i );
if ( ulpsDiff <= maxUlpsDiff )
{