mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-11-03 21:49:32 +01:00 
			
		
		
		
	Changed 'auto' into 'bool' for C++98 compatibility
This commit is contained in:
		@@ -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;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user