Changed 'auto' into 'bool' for C++98 compatibility

This commit is contained in:
CNugteren 2015-11-12 15:31:42 +01:00
parent 2585d280d1
commit 3523c39f44

View File

@ -46,11 +46,11 @@ namespace Detail {
friend bool operator == ( double lhs, Approx const& rhs ) { friend bool operator == ( double lhs, Approx const& rhs ) {
// Thanks to Richard Harris for his help refining this formula // 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 ) { if ( relativeOK ) {
return true; return true;
} }
auto absoluteOK = fabs( lhs - rhs.m_value ) < rhs.m_margin; bool absoluteOK = fabs( lhs - rhs.m_value ) < rhs.m_margin;
return absoluteOK; return absoluteOK;
} }