mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-24 21:49:24 +00:00
Changed 'auto' into 'bool' for C++98 compatibility
This commit is contained in:
parent
2585d280d1
commit
3523c39f44
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue