From 3523c39f44c855c1d6f0d7ef3d3a3ea12d4a8987 Mon Sep 17 00:00:00 2001 From: CNugteren Date: Thu, 12 Nov 2015 15:31:42 +0100 Subject: [PATCH] Changed 'auto' into 'bool' for C++98 compatibility --- include/internal/catch_approx.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/internal/catch_approx.hpp b/include/internal/catch_approx.hpp index 5dd7df8e..08a15b71 100644 --- a/include/internal/catch_approx.hpp +++ b/include/internal/catch_approx.hpp @@ -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; }