mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 07:16:10 +01:00
Changed 'auto' into 'bool' for C++98 compatibility
This commit is contained in:
parent
2585d280d1
commit
3523c39f44
@ -46,11 +46,11 @@ namespace Detail {
|
||||
|
||||
friend bool operator == ( double lhs, Approx const& rhs ) {
|
||||
// Thanks to Richard Harris for his help refining this formula
|
||||
auto relativeOK = fabs( lhs - rhs.m_value ) < rhs.m_epsilon * (rhs.m_scale + (std::max)( fabs(lhs), fabs(rhs.m_value) ) );
|
||||
bool relativeOK = fabs( lhs - rhs.m_value ) < rhs.m_epsilon * (rhs.m_scale + (std::max)( fabs(lhs), fabs(rhs.m_value) ) );
|
||||
if ( relativeOK ) {
|
||||
return true;
|
||||
}
|
||||
auto absoluteOK = fabs( lhs - rhs.m_value ) < rhs.m_margin;
|
||||
bool absoluteOK = fabs( lhs - rhs.m_value ) < rhs.m_margin;
|
||||
return absoluteOK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user